void Start() { _isAlive = true; rotateGrid = GameObject.Find("Grid").GetComponent <RotateGrid>(); left = GameObject.Find("LeftCheck"); right = GameObject.Find("RightCheck"); _target = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); _Interact = GameObject.Find("Player").GetComponent <Interaction>(); _spikes = GameObject.FindGameObjectsWithTag("danger"); button = GameObject.FindGameObjectWithTag("button"); wall = GameObject.Find("Wall"); }
// Use this for initialization void Init() { SentFinishedGame = false; GameObject[] goals = GameObject.FindGameObjectsWithTag("GoalZone"); goalCheck = new List <GoalCheck>(); grid = GameObject.Find("Grid").transform; rotateGrid = grid.GetComponent <RotateGrid>(); for (int i = 0; i < goals.Length; i++) { if (goals[i].transform.IsChildOf(grid)) { goalCheck.Add(goals[i].GetComponent <GoalCheck>()); } } }
/* #endregion */ /* #region ---- Set Player Rotation Grid -------------------------------------------------- */ void createPlayerRotationGrid() { RotateGrid = new RotateGrid(MatchManager); }