Exemplo n.º 1
0
    // 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> ();
    }
Exemplo n.º 2
0
 // 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> ();
 }
Exemplo n.º 3
0
    // 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);
    }