void Awake() { ++mTurnCount; mActivePlayer = PLAYER_ID.ONE; mGamePhase = GAME_PHASE.MANA_PHASE; mActveManazone = mManazone_One; mActiveDeck = mDeck_One; mActiveHand = mHand_One; mHand_One.SetDeck(mDeck_One); mHand_Two.SetDeck(mDeck_Two); mDeck_One.SetOwner(PLAYER_ID.ONE); mDeck_Two.SetOwner(PLAYER_ID.TWO); mShieldzone_One.SetDeck(mDeck_One); mBattlezone_One.SetOwner(PLAYER_ID.ONE); mBattlezone_Two.SetOwner(PLAYER_ID.TWO); if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
public void EndTurn() { mActivePlayer = mActivePlayer == PLAYER_ID.ONE ? PLAYER_ID.TWO : PLAYER_ID.ONE; ChangeUI(); if (mActivePlayer == PLAYER_ID.ONE) { mZoneList = mZoneList_P1; mActveManazone = mManazone_One; mActiveDeck = mDeck_One; mActiveBattlezone = mBattlezone_One; mActiveHand = mHand_One; } else { mZoneList = mZoneList_P2; mActveManazone = mManazone_Two; mActiveDeck = mDeck_Two; mActiveBattlezone = mBattlezone_Two; mActiveHand = mHand_Two; } mActiveHand.Draw(); mActveManazone.NewTurn(); mActiveBattlezone.NewTurn(); mGamePhase = GAME_PHASE.MANA_PHASE; }
private void Untap() { if (mIsTapped == false || mIsTappedLocked == true) { //Handle this?? return; } mIsTapped = false; ManazoneManager activeManazone = GameManager.instance.GetActiveManazone(); activeManazone.ManaUntap(mCardReference.GetCardCivilization()); Vector3 oldRotation = mCardReference.transform.eulerAngles; mCardReference.transform.eulerAngles = new Vector3(oldRotation.x, mCardReference.GetUntappedEulerAngleY(), oldRotation.z); }