protected virtual void Awake() { enemy = GetComponent <Enemy>(); ai = GetComponent <EnemyAI>(); ui = GetComponent <UI_Enemy>(); player = FindObjectOfType <Player>(); }
public bool EnemyUseSkill(Deck deck, UI_Enemy enemy) { if (enemy._skill._blackSprite.activeSelf) { return(false); } Card[] cards = deck.Get_Deck(); int count = 0; for (int i = 0; i < cards.Length; ++i) { if (false == cards[i]._bUsed) { count++; } } if (Random.Range(0, count + 1) == 0) { return(true); } return(false); }
void Awake() { Singleton.inGameManager = this; _uiPlayer = transform.Find("InGameUI/UI_Player").GetComponent <UI_Player>(); _uiEnemy = transform.Find("InGameUI/UI_Enemy").GetComponent <UI_Enemy>(); _uiRound = transform.Find("InGameUI/UI_Round").GetComponent <UI_Round>(); _myPlayer = transform.Find("Player/AnchorL/Player_01").GetComponent <MyPlayer>(); _enemyPlayer = transform.Find("Player/AnchorR/Player_02").GetComponent <EnemyPlayer>(); _effectAttack = transform.Find("InGameUI/Ef").GetComponent <Effect_Attack>(); _quarter = 1; _attribute = CARD_TYPE.END; _bDuece = false; _gameState = GAME_STATE.END; }