Exemple #1
0
 void Update()
 {
     if (playerInput.IsAttack())
     {
         StartCoroutine(playerShot.GenerateBullet());
     }
     if (!BulletCount.IsBullet())
     {
         playerMover.ShotDirection();
     }
 }
Exemple #2
0
 public override void MoveBlock()
 {
     if (BulletCount.IsBullet())
     {
         isMove = true;                     //弾が発射された
     }
     if (isMove && !BulletCount.IsBullet()) //発射された弾が全部消えた
     {
         transform.position += new Vector3(0, 0.5f, 0);
         isMove              = false;
     }
 }
 private void GenerateBlock()
 {
     if (BulletCount.IsBullet())
     {
         isGenerate = true;                     //弾が発射された
     }
     if (isGenerate && !BulletCount.IsBullet()) //発射された弾が全部消えた
     {
         var index = Random.Range(0, blocks.Length);
         Instantiate(blocks[index], GeneratePosition(), Quaternion.identity);
         isGenerate = false;
     }
 }
 // Start is called before the first frame update
 private void Start()
 {
     m_defaultSpeed  = speed;
     m_bulletCount   = GetComponent <BulletCount>();
     m_enemyBehavior = GameObject.FindObjectOfType <EnemyBehavior>();
 }