Esempio n. 1
0
 protected override void Initialize()
 {
     // refactor
     viewState    = GameObject.Find("GameController").GetComponent <ViewStateController>();
     tileCollider = GetComponent <BoxCollider>();
     boundsCenter = tileCollider.bounds.center;
     boundsMin    = tileCollider.bounds.min;
     boundsMax    = tileCollider.bounds.max;
     enterEdge    = exitEdge = TileEdge.None;
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Awake()
 {
     mainCanvasObject = GameObject.Find("MainCanvas");
     Debug.Assert(mainCanvasObject != null, "Could not find <color=red>MainCanvas</color>.", gameObject);
     debugTextObject = GameObject.Find("DebugText");
     Debug.Assert(debugTextObject != null, "Could not find <color=red>debugTextObject</color>.", gameObject);
     gameDateNormalizedText = GameObject.Find("GameDateNormalized").GetComponent <Text>();
     Debug.Assert(gameDateNormalizedText != null, "Could not find <color=red>gameDateNormalizedText</color>.", gameObject);
     gameTimeText = GameObject.Find("GameTime").GetComponent <Text>();
     Debug.Assert(gameTimeText != null, "Could not find <color=red>gameTimeText</color>.", gameObject);
     timeController = TimeController.Instance;
     // REFACTOR
     viewStateController = GameObject.Find("ViewController").GetComponent <ViewStateController>();
 }
Esempio n. 3
0
 void Awake()
 {
     // refactor
     viewStateController = transform.parent.GetComponentInChildren <ViewStateController>();
     tileLayer           = LayerMask.GetMask("Tiles");
 }