void Start() { controller = GameObject.FindGameObjectWithTag(Tags.LessonController).GetComponent <LessonEventController>(); controller.TilePlaced += this.CheckTilePosition; GameObject[] Anchors = GameObject.FindGameObjectsWithTag(Tags.Anchor); _anchorCount = Anchors.Length; }
/// <summary> /// TODO /// </summary> private void Start() { Controller = GameObject.FindGameObjectWithTag(Tags.LessonController).GetComponent <LessonEventController>(); Controller.TilePlaced += this.CheckTilePosition; GameObject[] Anchors = GameObject.FindGameObjectsWithTag(Tags.Anchor); _anchorCount = Anchors.Length; Debug.Log("Anchors: " + _anchorCount); Debug.Log("Tiles: " + _tileCount); }
void Awake() { if (controller == null) { controller = this; } else { if (this != controller) { Destroy(this.gameObject); } } }
void Start() { controller = GameObject.FindGameObjectWithTag(Tags.LessonController).GetComponent <LessonEventController>(); controller.TilePlaced += this.CheckTilePosition; }