Add lantern on molo and delete zombie in day

This commit is contained in:
Kotrba Filip 2020-02-02 11:59:56 +01:00
parent a77718b134
commit 71725afb88
5 changed files with 99 additions and 5 deletions

View File

@ -0,0 +1,82 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4383041077390384848
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 759113255365536963}
- component: {fileID: 8634508539124340469}
- component: {fileID: 2661458808758249996}
m_Layer: 0
m_Name: lanterd
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &759113255365536963
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4383041077390384848}
m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071067}
m_LocalPosition: {x: 0, y: 2.886, z: 0}
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8634508539124340469
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4383041077390384848}
m_Mesh: {fileID: -5495902117074765545, guid: a20f14621725df742ad2c1028ff4f453, type: 3}
--- !u!23 &2661458808758249996
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4383041077390384848}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d02b5e657d523ea498a1c023be819ab8, type: 2}
- {fileID: -3846018093981099296, guid: a20f14621725df742ad2c1028ff4f453, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a9ed136ba2be534419d4299db71802df
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7868,7 +7868,7 @@ Transform:
m_Children:
- {fileID: 1139190780}
m_Father: {fileID: 0}
m_RootOrder: 25
m_RootOrder: 26
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2232049265454068919
PrefabInstance:
@ -8781,7 +8781,7 @@ PrefabInstance:
- target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c,
type: 3}
propertyPath: m_RootOrder
value: 26
value: 25
objectReference: {fileID: 0}
- target: {fileID: 7985979212931499549, guid: 204c7411afdd01a478b1a1e25607d50c,
type: 3}

View File

@ -39,9 +39,9 @@ public class BarricadeManager : MonoBehaviour
public void addPlank()
{
if (health < (barricadePlanks.Count * 50)) {
if (health < (barricadePlanks.Count * 35)) {
audioSource.PlayOneShot(buildSound);
health += 50;
health += 35;
offMeshLink.enabled = false;
}
}
@ -59,7 +59,7 @@ public class BarricadeManager : MonoBehaviour
{
for (int i = 0; i < barricadePlanks.Count; i++)
{
if (i < (health / 50)) {
if (i < (health / 35)) {
barricadePlanks[i].SetActive(true);
}
else

View File

@ -38,6 +38,11 @@ public class SpawnManager : MonoBehaviour
if (!night)
{
alreadySpawn = false;
GameObject[] enemies = GameObject.FindGameObjectsWithTag("Enemy");
foreach (GameObject localEnemy in enemies)
{
Destroy(localEnemy);
}
}
if (!alreadySpawn && night)