Esempio n. 1
0
 private void Start()
 {
     body = this.GetRigidBody();
     Game.Execute(Game.PlayerHealthUpdate, gameObject);
     Game.Execute(Game.SpecialUpdate, gameObject);
     Game.Execute(Game.PlayerBind, gameObject);
 }
Esempio n. 2
0
 private void SpecialPowerUp(Collider entity)
 {
     if (entity.HasNot(Tag.SPUP))
     {
         return;
     }
     Destroy(entity.gameObject);
     SpecialAtk.UseCount++;
     Game.Execute(Game.SpecialUpdate, gameObject);
 }
Esempio n. 3
0
 private void HealthPowerUp(Collider entity)
 {
     if (entity.HasNot(Tag.HPUP))
     {
         return;
     }
     Destroy(entity.gameObject);
     Health++;
     Game.Execute(Game.PlayerHealthUpdate, gameObject);
 }
Esempio n. 4
0
 private void IsDead()
 {
     if (Health > 0)
     {
         return;
     }
     Spawn(ExplosionPref, 1.2f);
     Game.Execute(Game.PlayerDie, gameObject);
     Destroy(gameObject);
 }
Esempio n. 5
0
 private void SpecialShoot()
 {
     if (SpecialAtk.UseCount < 1)
     {
         return;
     }
     if (!specialTimer.IsTimeUp(Time.fixedDeltaTime, SpecialAtk.FireRate))
     {
         return;
     }
     if (!Game.CurrentState.Special)
     {
         return;
     }
     SpecialAtk.Shoot(this.GetPosition());
     if (!SpecialAtk.HasTarget)
     {
         return;
     }
     SpecialAtk.UseCount--;
     specialTimer.Reset();
     Game.Execute(Game.SpecialUpdate, gameObject);
 }
Esempio n. 6
0
 private void OnTriggerEnter(Collider entity)
 {
     if (entity.Has(Tag.Boss))
     {
         Health = 0;
         IsDead();
     }
     HealthPowerUp(entity);
     SpecialPowerUp(entity);
     if (entity.HasNot(Tag.Enemy))
     {
         return;
     }
     Spawn(HitPref, 0.3f);
     Health--;
     if (!entity.GetComponent <BossGreatLaser>())
     {
         Destroy(entity.gameObject);
     }
     IsDead();
     Game.Execute(Game.PlayerHealthUpdate, gameObject);
     Game.Execute(Game.Hit, gameObject);
 }