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: ...@@ -497,15 +497,15 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 373884246} m_GameObject: {fileID: 373884246}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3, y: 0.82678336, z: -0.046875} m_LocalPosition: {x: -2.0594757, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1843638051} - {fileID: 1843638051}
- {fileID: 1253612856} - {fileID: 1253612856}
- {fileID: 594529602} - {fileID: 594529602}
m_Father: {fileID: 0} m_Father: {fileID: 484526474}
m_RootOrder: 9 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &414038052 --- !u!1001 &414038052
Prefab: Prefab:
...@@ -675,6 +675,37 @@ SpriteRenderer: ...@@ -675,6 +675,37 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 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 --- !u!1 &488923751
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1536,15 +1567,15 @@ Transform: ...@@ -1536,15 +1567,15 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1046844652} m_GameObject: {fileID: 1046844652}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -5, y: 0.82678336, z: -0.046875} m_LocalPosition: {x: -4.059476, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 812705190} - {fileID: 812705190}
- {fileID: 168295431} - {fileID: 168295431}
- {fileID: 80294246} - {fileID: 80294246}
m_Father: {fileID: 0} m_Father: {fileID: 484526474}
m_RootOrder: 10 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1048895977 --- !u!1 &1048895977
GameObject: GameObject:
...@@ -1955,15 +1986,15 @@ Transform: ...@@ -1955,15 +1986,15 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1393722531} m_GameObject: {fileID: 1393722531}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1, y: 0.82678336, z: -0.046875} m_LocalPosition: {x: -0.05947572, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 30074518} - {fileID: 30074518}
- {fileID: 911242811} - {fileID: 911242811}
- {fileID: 1565391572} - {fileID: 1565391572}
m_Father: {fileID: 0} m_Father: {fileID: 484526474}
m_RootOrder: 8 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1565391571 --- !u!1 &1565391571
GameObject: GameObject:
......
...@@ -7,11 +7,22 @@ public class PieManager : MonoBehaviour { ...@@ -7,11 +7,22 @@ public class PieManager : MonoBehaviour {
public static int pieCount = 3; public static int pieCount = 3;
public static bool pieInScene = false; public static bool pieInScene = false;
public static bool start = true; public static bool start = true;
public static int numTargets;
private void Update() private void Update()
{ {
if(pieCount == 0){ if(pieCount == 0){
return; 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