Ejemplo n.º 1
0
    void OnMouseDown()
    {
        //this tappedRedArrowCounter is for the tutorial
        tapRedArrowCounter++;
        activeMainPlayerOBJ    = GameObject.FindGameObjectWithTag("ActiveMain");
        activeMainPlayerScript = activeMainPlayerOBJ.GetComponent <MainChar>();
        QueueScript1 qScript = activeMainPlayerOBJ.GetComponentInChildren <QueueScript1>();

        if (qScript.myItemObjects.Count > 0)
        {
            activeMainPlayerScript.setMainTarget(activeMainPlayerScript.getTargetUnderConsideration());
            activeMainPlayerScript.getTargetUnderConsideration().setAssailant(activeMainPlayerScript);
            activeMainPlayerScript.setAttacking(true);
            activeMainPlayerScript.myArrow.SetActive(false);
            //uncomment the code below to hide all character queues when character first starts moving

            /*activeMainPlayerScript.myQueueOBJ.SetActive(false);
             * foreach(Character chr in levelManScript.charsInLevel){
             *      chr.myQueueOBJ.SetActive(false);
             * }*/
            levelManScript.setGameState(GAME_STATE.CHAIN_REACTION);
            levelManScript.enableAllInventoryColliders(false);

            //
        }
    }
Ejemplo n.º 2
0
	void OnMouseDown(){
		//this tappedRedArrowCounter is for the tutorial
		tapRedArrowCounter++;
		activeMainPlayerOBJ = GameObject.FindGameObjectWithTag ("ActiveMain");
		activeMainPlayerScript = activeMainPlayerOBJ.GetComponent <MainChar>();
		QueueScript1 qScript = activeMainPlayerOBJ.GetComponentInChildren<QueueScript1>();
		if(qScript.myItemObjects.Count > 0){
			activeMainPlayerScript.setMainTarget (activeMainPlayerScript.getTargetUnderConsideration());
			activeMainPlayerScript.getTargetUnderConsideration().setAssailant(activeMainPlayerScript);
			activeMainPlayerScript.setAttacking(true);
			activeMainPlayerScript.myArrow.SetActive(false);
			//uncomment the code below to hide all character queues when character first starts moving
			/*activeMainPlayerScript.myQueueOBJ.SetActive(false);
			foreach(Character chr in levelManScript.charsInLevel){
				chr.myQueueOBJ.SetActive(false);
			}*/
			levelManScript.setGameState(GAME_STATE.CHAIN_REACTION);
			levelManScript.enableAllInventoryColliders(false);

			//

		}
	}