Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        //Get action manager
        actionMan = this.GetComponent <actionManager>();

        //Set up vars similar to TouchPhase for mouse use
        mouseButtonDown     = mouseButtonHeld = false;
        mouseButtonReleased = true;

        //Set Values for Touch
        touchStartPos = touchEndPos = new Vector2(0, 0);
        touchStarted  = false; touchEnded = true;
        touchHoldTime = 0.0f;
    }
Exemplo n.º 2
0
    void Start()
    {
        checkTouch     = GameObject.FindGameObjectWithTag("gameController").GetComponent <touchManager>();
        buildingSelect = GameObject.FindGameObjectWithTag("gameController").GetComponent <buildingSelection>();
        gridArray      = GetComponentInParent <gridLayout>();


        //Add action test
        if (actManObj == null)
        {
            actManObj = GameObject.Find("gameController");
        }
        ;
        actionManager actMan = actManObj.GetComponent <actionManager>();
        //int listId = actMan.AddAction (this.gameObject, actionManager.inputType.tap, true, OnTapped);
    }
Exemplo n.º 3
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);
    }