コード例 #1
0
ファイル: ButtleManager.cs プロジェクト: NY0310/internship
    public override void Execute(Attack attack, ButtleManager buttlemanager)
    {
        //  buttlemanager._EnemyManager = GameObject.Find("EnemyManager");

        if (IsFirst)
        {
            //敵からプレイヤへ攻撃
            List <float> NewHpDate = buttlemanager._PlayerManager.GetComponent <PlayerManager>().HitDamage(buttlemanager._EnemyManager.GetComponent <EnemyManager>().GetAttack());
            foreach (var item in NewHpDate)
            {
                buttlemanager.ButtleAnimationCreate(buttlemanager._PlayerManager.GetComponent <PlayerManager>().HpPrefab.GetComponent <HpBar>(), item, new Vector3(0, 0, 0), new Vector3(0, 0, 0));
            }
            IsFirst = false;
        }
        buttlemanager.ButtleAnimationDestroy();

        if (buttlemanager._ButtleAnimationList.Count == 0)
        {
            if (IsEnemyCreate)
            {
                buttlemanager.ChangeState(EnemyCreate.GetInstance());
            }
            else
            {
                buttlemanager.ChangeState(Wait.GetInstance());
            }
            //プレイヤの攻撃に移行
            attack._AttackState = PlayerAttack.GetInstance();
        }
    }
コード例 #2
0
ファイル: ButtleManager.cs プロジェクト: NY0310/internship
 // Use this for initialization
 void Start()
 {
     PlayerManager = GameObject.Find("PlayerManager");
     //Enemy = GameObject.Find("Enemy");
     // Enemy = Instantiate(Enemy);
     ButtleState = EnemyCreate.GetInstance();
     //ステージ生成
     Stage        = Instantiate(Stage);
     EnemyManager = Instantiate(EnemyManager);
     //  BottanManager = GameObject.Find("BottonManager");
 }