// Use this for initialization void Start() { movementInputTimer = Time.fixedTime; options = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameOptions> (); worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> (); worldSound = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldSound> (); move = gameObject.GetComponent<TileMovement>(); attack = gameObject.GetComponent<TileAttack>(); camera = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<Camera> (); actorManager = GameObject.FindGameObjectWithTag ("GameController").GetComponent<ActorManager> (); player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> (); ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> (); }
// Use this for initialization void Start() { worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> (); actor = gameObject.GetComponent<Actor>(); player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> (); move = gameObject.GetComponent<TileMovement>(); attack = gameObject.GetComponent<TileAttack>(); ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> (); }
// Setup public void SetupObjectReferences() { move = gameObject.GetComponent<TileMovement>(); attack = gameObject.GetComponent<TileAttack>(); worldMap = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldMap> (); worldSound = GameObject.FindGameObjectWithTag ("GameController").GetComponent<WorldSound> (); ui = GameObject.FindGameObjectWithTag ("UIMain").GetComponent<UIMain> (); actorManager = GameObject.FindGameObjectWithTag ("GameController").GetComponent<ActorManager> (); player = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player> (); options = GameObject.FindGameObjectWithTag ("GameController").GetComponent<GameOptions> (); animationPosition = new Vector2(tileX*worldMap.mapTileSize,tileY*worldMap.mapTileSize); }