public void ResetSwitch(int spawnAreaIndex, int pyramidSpawnIndex) { areaComponent.PlaceObject(gameObject, spawnAreaIndex); state = false; pyramidIndex = pyramidSpawnIndex; // tag = "switchOff"; transform.rotation = Quaternion.Euler(0f, 0f, 0f); myButton.GetComponent <Renderer>().material = offMaterial; }
public override void AgentReset() { var enumerable = Enumerable.Range(0, 9).OrderBy(x => Guid.NewGuid()).Take(9); var items = enumerable.ToArray(); m_MyArea.CleanPyramidArea(); m_AgentRb.velocity = Vector3.zero; m_MyArea.PlaceObject(gameObject, items[0]); transform.rotation = Quaternion.Euler(new Vector3(0f, Random.Range(0, 360))); m_SwitchLogic.ResetSwitch(items[1], items[2]); m_MyArea.CreateStonePyramid(1, items[3]); m_MyArea.CreateStonePyramid(1, items[4]); m_MyArea.CreateStonePyramid(1, items[5]); m_MyArea.CreateStonePyramid(1, items[6]); m_MyArea.CreateStonePyramid(1, items[7]); m_MyArea.CreateStonePyramid(1, items[8]); }
public override void AgentReset() { var enumerable = Enumerable.Range(0, 9).OrderBy(x => Guid.NewGuid()).Take(9); var items = enumerable.ToArray(); myArea.CleanPyramidArea(); agentRb.velocity = Vector3.zero; myArea.PlaceObject(gameObject, items[1]); transform.rotation = Quaternion.Euler(new Vector3(0f, Random.Range(0, 360))); switchLogic.ResetSwitch(items[0], items[0]); for (var i = 1; i < 9; i++) { myArea.CreatePeople(1, items[i]); myArea.CreateTree(1, items[i]); myArea.CreateSkinnyTree(2, items[i]); myArea.CreateBush(1, items[i]); } }