Commit 88447b07 authored by astatham's avatar astatham
Browse files

Scene spawns with a random number of targets - seems to prioritise disabling...

Scene spawns with a random number of targets - seems to prioritise disabling Silases first, then Ahavas, Johns last
parent 794038c0
......@@ -497,15 +497,15 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 373884246}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3, y: 0.82678336, z: -0.046875}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.0594757, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1843638051}
- {fileID: 1253612856}
- {fileID: 594529602}
m_Father: {fileID: 0}
m_RootOrder: 9
m_Father: {fileID: 484526474}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &414038052
Prefab:
......@@ -675,6 +675,37 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &484526473
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 484526474}
m_Layer: 0
m_Name: Targets
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &484526474
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 484526473}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.9405243, y: 0.82678336, z: -0.046875}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1046844653}
- {fileID: 373884247}
- {fileID: 1393722532}
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &488923751
GameObject:
m_ObjectHideFlags: 0
......@@ -1536,15 +1567,15 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1046844652}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5, y: 0.82678336, z: -0.046875}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4.059476, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 812705190}
- {fileID: 168295431}
- {fileID: 80294246}
m_Father: {fileID: 0}
m_RootOrder: 10
m_Father: {fileID: 484526474}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1048895977
GameObject:
......@@ -1955,15 +1986,15 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1393722531}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1, y: 0.82678336, z: -0.046875}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.05947572, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 30074518}
- {fileID: 911242811}
- {fileID: 1565391572}
m_Father: {fileID: 0}
m_RootOrder: 8
m_Father: {fileID: 484526474}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1565391571
GameObject:
......
......@@ -7,6 +7,7 @@ public class PieManager : MonoBehaviour {
public static int pieCount = 3;
public static bool pieInScene = false;
public static bool start = true;
public static int numTargets;
private void Update()
{
......@@ -14,4 +15,14 @@ public class PieManager : MonoBehaviour {
return;
}
}
void Start()
{
numTargets = Random.Range(1, 9);
for (int i = 0; i < 9 - numTargets; i++)
{
PieTarget target = FindObjectOfType<PieTarget>();
target.transform.parent.gameObject.SetActive(false);
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment