コード例 #1
0
//	IEnumerator StartUpLoader(){
//		SceneManager.LoadScene("XMLLoaderScene"); //Only happens if coroutine is finished
//		print("its still going");
//		yield return null;
//	}


//	public void makeBody(){
//		enemyController.populateBody ();
//		//enemyController.takeDamage ();
//	}
//	public void makeActiveSquares(){
//		playAreaController.populateEnemyPlayAreaSquares ();
//	}

    public void cardClickedOn(XMLWeaponHitData WeaponHitMatrix, float weaponDamage)                     //command sent from the CardBehaviour script with info about the damage its doing
    {
        currentClickedOnCardWeaponMatrix = new CurrentWeaponHitBox(true, WeaponHitMatrix, weaponDamage);
        enemyController.getPlayAreaOfEnemy().hardResetSmallSquares();

        //boolCardClickedOn = true;
    }
コード例 #2
0
    //private bool boolCardClickedOn;

    void Start()
    {
        GameObject loaderScriptTemp = GameObject.FindWithTag("MainLoader");                                     //whole block is for grabbing the Deck object so it can deal a card when clicked

        if (loaderScriptTemp == null)
        {
            SceneManager.LoadScene("XMLLoaderScene");             //Only happens if coroutine is finished
//			StartCoroutine (StartUpLoader());
            return;
        }
        enemyController  = gameObject.GetComponentInChildren <EnemyScript>();
        playerController = gameObject.GetComponentInChildren <PlayerScript>();

        enemyDeckController  = enemyController.GetComponentInChildren <DeckScript>();
        playerDeckController = playerController.GetComponentInChildren <DeckScript>();
//		print ("and still");
        //boolCardClickedOn = false;
        currentClickedOnCardWeaponMatrix = new CurrentWeaponHitBox(false, null, 0);
        shuffleDiscardsButton.onClick.AddListener(shuffleDiscard);
//		MakeSquaresButton.onClick.AddListener(makeActiveSquares);
        discardEverythingButton.onClick.AddListener(discardAllActiveShuffle);
//		makeBodyButton.onClick.AddListener(makeBody);

//		GameObject deckControllerObjectTemp = GameObject.FindWithTag("DeckController");				//whole block is for grabbing the Deck object so it can deal a card when clicked
//		if(deckControllerObjectTemp != null){
//			deckController = deckControllerObjectTemp.GetComponent<DeckScript>();
//			}
//		if(deckControllerObjectTemp == null){
//			Debug.Log ("Cannot find 'deckController'object");
//			}
//		GameObject playAreaControllerTemp = GameObject.FindWithTag("PlayAreaController");
//		if(playAreaControllerTemp != null){
//			playAreaController = playAreaControllerTemp.GetComponent<PlayAreaScript>();
//		}
//		if(playAreaControllerTemp == null){
//			Debug.Log ("Cannot find 'DeckBehaviour'object");
//		}

//		StartCoroutine (playAreaController.ManualStart ());
//		print ("manual play area done");

        StartCoroutine(enemyController.ManualStart());
//		print ("manual enemy cont done");
//		playAreaController.populateEnemyPlayAreaSquares ();
//		print ("enemy play area population started");
    }
コード例 #3
0
 public void takeAHit(CurrentWeaponHitBox incomingWeaponHitBox, int incomingX, int incomingY)
 {
     grid [incomingX] [incomingY].takeOneSquareDamage(incomingWeaponHitBox.weaponDamage);
 }