Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        //Get game controller
        GameObject gameCtrl = GameObject.FindGameObjectWithTag("gameController");

        //Get Action Manager
        actMan = gameCtrl.GetComponent <actionManager>();

        //Get building selection
        buildingSelect = gameCtrl.GetComponent <buildingSelection>();

        //Get slot
        slot = this.gameObject.GetComponent <toolbarSlot>();

        //Add Action to execute select function on tap, use the slot image game object for this
        slot.actionID = actMan.AddAction(slot.gameObject, actionManager.inputType.tap, true, SelectBulldozer);
    }