This commit is contained in:
Kotrba Filip 2020-02-01 19:49:53 +01:00
parent a26ab08546
commit 5be6cb1476
14 changed files with 747 additions and 67 deletions

View File

@ -170,9 +170,10 @@ GameObject:
m_Component:
- component: {fileID: 4198863072573714306}
- component: {fileID: 9169310670609138842}
- component: {fileID: 8296172667468284673}
m_Layer: 0
m_Name: ammo_box
m_TagString: Untagged
m_TagString: Interact
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -184,7 +185,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 873138054105406865}
m_LocalRotation: {x: -0, y: 0.585185, z: -0, w: 0.81089985}
m_LocalRotation: {x: 0, y: 0.58518416, z: 0, w: 0.8109005}
m_LocalPosition: {x: 47.525, y: -2.81, z: -12.22}
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
m_Children:
@ -229,6 +230,42 @@ MonoBehaviour:
blockType: 4
health: 100
healthRate: 5
amountModels:
- {fileID: 4443642083919416725}
- {fileID: 5205200862043998919}
- {fileID: 8452048823607473439}
- {fileID: 8456627140763662303}
- {fileID: 7373073294925482436}
- {fileID: 4937171485821671441}
- {fileID: 1639123759080977681}
- {fileID: 715030014523983583}
- {fileID: 6141267715529604239}
- {fileID: 857922654142497041}
- {fileID: 4555224919543958357}
- {fileID: 8845523186980114736}
- {fileID: 6629251295739648829}
- {fileID: 2583879648814668796}
- {fileID: 5626775279250410506}
- {fileID: 3898591326953282408}
- {fileID: 2469224091592576205}
- {fileID: 6841636828864525375}
- {fileID: 8190553761067856993}
- {fileID: 1840520068144572235}
- {fileID: 2199959104259311449}
- {fileID: 8806615898572238909}
--- !u!65 &8296172667468284673
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 873138054105406865}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 2.3, y: 2.2, z: 4.6}
m_Center: {x: 0, y: 1.1, z: 0}
--- !u!1 &1639123759080977681
GameObject:
m_ObjectHideFlags: 0

View File

@ -1435,7 +1435,7 @@ GameObject:
- component: {fileID: 2435173728554922900}
m_Layer: 0
m_Name: wooden_plank_stokpile
m_TagString: Untagged
m_TagString: Interact
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -1495,6 +1495,35 @@ MonoBehaviour:
m_EditorClassIdentifier:
blockType: 3
health: 100
healthRate: 10
amountModels:
- {fileID: 5072048420132254878}
- {fileID: 248512549599306158}
- {fileID: 6980898580401705906}
- {fileID: 1897976111086725114}
- {fileID: 8839370382815059758}
- {fileID: 8768503417553488399}
- {fileID: 2329779877516623269}
- {fileID: 6775036794450576978}
- {fileID: 6199803563995182287}
- {fileID: 6404659247269481042}
- {fileID: 4159915305215488823}
- {fileID: 9160998092549646192}
- {fileID: 3185792367686729924}
- {fileID: 4721978855144505460}
- {fileID: 7381431994624522573}
- {fileID: 618757391011973604}
- {fileID: 5882290588515455028}
- {fileID: 1381889007306692253}
- {fileID: 5548633833234765463}
- {fileID: 1003082737763468099}
- {fileID: 1090375850311900763}
- {fileID: 5396578295194344855}
- {fileID: 1585754648870115333}
- {fileID: 3278748000320003741}
- {fileID: 8487709724287121870}
- {fileID: 2697596682010262550}
- {fileID: 3682382153138045620}
--- !u!65 &2435173728554922900
BoxCollider:
m_ObjectHideFlags: 0

View File

@ -328,6 +328,79 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d2947b7cd556cb74f84ecd7339936f32, type: 3}
--- !u!1 &443694932
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 443694933}
- component: {fileID: 443694935}
- component: {fileID: 443694934}
m_Layer: 5
m_Name: Image (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &443694933
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443694932}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1327297297}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 105, y: -105}
m_SizeDelta: {x: 85, y: 85}
m_Pivot: {x: 0, y: 1}
--- !u!114 &443694934
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443694932}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 52012760a1df8ad4facb31c66d6bfaec, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &443694935
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443694932}
m_CullTransparentMesh: 0
--- !u!1 &462335046 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4695666576454475813, guid: b5a9b7f0ff35a024b974960e652c8e33,
@ -502,7 +575,7 @@ Canvas:
serializedVersion: 3
m_RenderMode: 1
m_Camera: {fileID: 1254913617}
m_PlaneDistance: 1
m_PlaneDistance: 0.4
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
@ -524,6 +597,7 @@ RectTransform:
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 1692949638}
- {fileID: 1327297297}
m_Father: {fileID: 0}
m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -545,6 +619,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
InteractIcon: {fileID: 1692949637}
Wood: {fileID: 863154880}
Ammo: {fileID: 802293425}
--- !u!1001 &591872493
PrefabInstance:
m_ObjectHideFlags: 0
@ -720,6 +796,160 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 20
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &802293424
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 802293427}
- component: {fileID: 802293426}
- component: {fileID: 802293425}
m_Layer: 5
m_Name: Text (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &802293425
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 802293424}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 26
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
--- !u!222 &802293426
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 802293424}
m_CullTransparentMesh: 0
--- !u!224 &802293427
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 802293424}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1327297297}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10, y: -105}
m_SizeDelta: {x: 85, y: 85}
m_Pivot: {x: 0, y: 1}
--- !u!1 &863154877
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 863154878}
- component: {fileID: 863154879}
- component: {fileID: 863154880}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &863154878
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 863154877}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1327297297}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 10, y: -10}
m_SizeDelta: {x: 85, y: 85}
m_Pivot: {x: 0, y: 1}
--- !u!222 &863154879
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 863154877}
m_CullTransparentMesh: 0
--- !u!114 &863154880
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 863154877}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 26
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
--- !u!1001 &957927410
PrefabInstance:
m_ObjectHideFlags: 0
@ -1055,6 +1285,83 @@ Camera:
type: 3}
m_PrefabInstance: {fileID: 7985979212702423926}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1327297296
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1327297297}
- component: {fileID: 1327297299}
- component: {fileID: 1327297298}
m_Layer: 5
m_Name: WoodAndAmmo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1327297297
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1327297296}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_Children:
- {fileID: 863154878}
- {fileID: 802293427}
- {fileID: 2093621605}
- {fileID: 443694933}
m_Father: {fileID: 587476773}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 200}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1327297298
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1327297296}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1327297299
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1327297296}
m_CullTransparentMesh: 0
--- !u!1 &1345459422 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 8150345748488139401, guid: b5bdffdb5058d5e458831042023d3abc,
@ -1188,7 +1495,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1692949638
RectTransform:
m_ObjectHideFlags: 0
@ -1551,6 +1858,79 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b5bdffdb5058d5e458831042023d3abc, type: 3}
--- !u!1 &2093621604
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2093621605}
- component: {fileID: 2093621607}
- component: {fileID: 2093621606}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2093621605
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2093621604}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1327297297}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 105, y: -10}
m_SizeDelta: {x: 85, y: 85}
m_Pivot: {x: 0, y: 1}
--- !u!114 &2093621606
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2093621604}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 3893b3934f22d9f48b4f9371edbe6706, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &2093621607
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2093621604}
m_CullTransparentMesh: 0
--- !u!1001 &2435173729303179787
PrefabInstance:
m_ObjectHideFlags: 0
@ -1558,21 +1938,11 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2435173728554922901, guid: 17027e96daa46634eac3c9bcf07b06b0,
type: 3}
propertyPath: healthRate
value: 10
objectReference: {fileID: 0}
- target: {fileID: 5974751188148447902, guid: 17027e96daa46634eac3c9bcf07b06b0,
type: 3}
propertyPath: m_Name
value: wooden_plank_stokpile
objectReference: {fileID: 0}
- target: {fileID: 5974751188148447902, guid: 17027e96daa46634eac3c9bcf07b06b0,
type: 3}
propertyPath: m_TagString
value: Interact
objectReference: {fileID: 0}
- target: {fileID: 7255806235893078157, guid: 17027e96daa46634eac3c9bcf07b06b0,
type: 3}
propertyPath: m_LocalPosition.x
@ -2344,17 +2714,17 @@ PrefabInstance:
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
propertyPath: m_LocalPosition.x
value: 47.525
value: 46.961
objectReference: {fileID: 0}
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
propertyPath: m_LocalPosition.y
value: -2.81
value: -3.223
objectReference: {fileID: 0}
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
propertyPath: m_LocalPosition.z
value: -12.22
value: -13.73
objectReference: {fileID: 0}
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
@ -2364,7 +2734,7 @@ PrefabInstance:
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.585185
value: 0.7105003
objectReference: {fileID: 0}
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
@ -2374,7 +2744,7 @@ PrefabInstance:
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.81089985
value: 0.70369697
objectReference: {fileID: 0}
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
@ -2389,7 +2759,7 @@ PrefabInstance:
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 71.632
value: 90.551
objectReference: {fileID: 0}
- target: {fileID: 4198863072573714306, guid: 52aecb86af67bc64782a3b7bece87dfd,
type: 3}

View File

@ -12,6 +12,7 @@ public class BlockManager : MonoBehaviour
private Animation animation;
private PlayerManager player;
private bool action = false;
public List<GameObject> amountModels = new List<GameObject>();
// Start is called before the first frame update
void Start()
@ -50,6 +51,44 @@ public class BlockManager : MonoBehaviour
healthTime = healthRate + Time.time;
}
}
viewHealthAs();
}
void viewHealthAs()
{
if (blockType == BlockType.Wood) {
if (amountModels.Count > 0)
{
for (int i = 0; i < amountModels.Count; i++)
{
if (i < ((100 - health) / 3.7f))
{
amountModels[i].SetActive(false);
}
else
{
amountModels[i].SetActive(true);
}
}
}
}
else if (blockType == BlockType.Ammo)
{
if (amountModels.Count > 0)
{
for (int i = 0; i < amountModels.Count; i++)
{
if (i < ((100 - health) / 4.5f))
{
amountModels[i].SetActive(false);
}
else
{
amountModels[i].SetActive(true);
}
}
}
}
}
public void Action()

View File

@ -153,7 +153,7 @@ public class EnemyManager : MonoBehaviour
void Attack()
{
RaycastHit hit;
if (Physics.Raycast(transform.position + new Vector3(0,0.5f,0),transform.forward,out hit,3) && attackTime <= Time.time)
if (Physics.Raycast(transform.position + new Vector3(0,0.5f,0),transform.forward,out hit,2) && attackTime <= Time.time)
{
if (hit.transform.CompareTag("Player"))
{

View File

@ -6,6 +6,8 @@ using UnityEngine.UI;
public class GuiManager : MonoBehaviour
{
public GameObject InteractIcon;
public Text Wood;
public Text Ammo;
// Start is called before the first frame update
void Start()

View File

@ -39,6 +39,8 @@ public class PlayerManager : MonoBehaviour
// Update is called once per frame
void Update()
{
guiManager.Wood.text = barricadeMaterials.ToString();
guiManager.Ammo.text = ammo.ToString();
Move();
RunSwitch();
SelectWeapon();
@ -122,6 +124,7 @@ public class PlayerManager : MonoBehaviour
if (Input.mouseScrollDelta.y > 0)
{
WeaponManager weaponManager = weaponList[selectedWeapon].GetComponent<WeaponManager>();
weaponManager.player = this;
if (weaponManager != null && createWeapon != null)
{
Destroy(createWeapon);
@ -137,6 +140,7 @@ public class PlayerManager : MonoBehaviour
else if (Input.mouseScrollDelta.y < 0)
{
WeaponManager weaponManager = weaponList[selectedWeapon].GetComponent<WeaponManager>();
weaponManager.player = this;
if (weaponManager != null && createWeapon != null)
{
Destroy(createWeapon);
@ -151,6 +155,7 @@ public class PlayerManager : MonoBehaviour
}
}
WeaponManager weaponManager2 = weaponList[selectedWeapon].GetComponent<WeaponManager>();
weaponManager2.player = this;
if (weaponManager2 != null && createWeapon == null)
{
createWeapon = Instantiate(weaponList[selectedWeapon]) as GameObject;
@ -195,10 +200,13 @@ public class PlayerManager : MonoBehaviour
if (Input.GetAxisRaw("Build") > 0 && buildTime < Time.time && barricadeMaterials > 0 && hit.transform.tag == "BarricadeField")
{
BarricadeManager barricadeManager = hit.transform.GetComponent<BarricadeManager>();
if (barricadeManager.health < (barricadeManager.barricadePlanks.Count * 50))
{
barricadeManager.addPlank();
barricadeMaterials--;
buildTime = buildRate + Time.time;
}
}
if (Input.GetAxisRaw("Build") > 0 && hit.transform.tag == "Interact")
{
}

View File

@ -13,6 +13,7 @@ public class WeaponManager : MonoBehaviour
public float fireRate = 0.5f;
private float fireTime;
public Animator animator;
public PlayerManager player;
public bool hit = false;
// Start is called before the first frame update
@ -32,20 +33,22 @@ public class WeaponManager : MonoBehaviour
if (Input.GetMouseButtonDown(0) && fireTime <= Time.time) {
if (weaponType == WeaponType.Shoot)
{
if (particleShoot != null)
if (particleShoot != null && player.ammo > 1)
{
GameObject shoot = Instantiate(particleShoot, spawnShoot.transform.position, spawnShoot.transform.rotation);
player.ammo -= 2;
Destroy(shoot, 0.3f);
fireTime = fireRate + Time.time;
}
}
else if (weaponType == WeaponType.Meele)
{
animator.ResetTrigger("Hit");
animator.SetTrigger("Hit");
}
fireTime = fireRate + Time.time;
}
}
}
void Hit_Enemy_Start()
{
hit = true;

View File

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
@ -31,16 +31,16 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
filterMode: 0
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
@ -49,9 +49,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
@ -70,13 +70,61 @@ TextureImporter:
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:

View File

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
@ -31,16 +31,16 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
filterMode: 0
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
@ -49,9 +49,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
@ -70,13 +70,61 @@ TextureImporter:
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:

View File

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
@ -31,16 +31,16 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
filterMode: 0
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
@ -49,9 +49,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
@ -70,13 +70,61 @@ TextureImporter:
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:

View File

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
@ -31,16 +31,16 @@ TextureImporter:
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
filterMode: 0
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
@ -49,9 +49,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
@ -70,13 +70,61 @@ TextureImporter:
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices: