コード例 #1
0
 protected override void OnTakesDamage(DamageEventArgs e)
 {
     base.OnTakesDamage(e);
     if (HitPoints <= MaxHitPoints * 0.1)
     {
         meteorRain.MeteorSpawnSpeed = 2;
     }
     else if (HitPoints <= MaxHitPoints * 0.3)
     {
         meteorRain.MeteorSpawnSpeed = 1;
     }
     else if (HitPoints <= MaxHitPoints * 0.5 && first)
     {
         meteorRain = new Effects.MeteorRain {
             MeteorSpawnSpeed = 0.5f
         };
         Game.Instance.Scene.Add(meteorRain);
         first = false;
     }
 }
コード例 #2
0
 protected override void OnTakesDamage(DamageEventArgs e)
 {
     base.OnTakesDamage(e);
     if (HitPoints <= MaxHitPoints * 0.1)
     {
         meteorRain.MeteorSpawnSpeed = 2;
     }
     else if (HitPoints <= MaxHitPoints * 0.3)
     {
         meteorRain.MeteorSpawnSpeed = 1;
     }
     else if (HitPoints <= MaxHitPoints * 0.5 && first)
     {
         meteorRain = new Effects.MeteorRain { MeteorSpawnSpeed = 0.5f };
         Game.Instance.Scene.Add(meteorRain);
         first = false;
     }
 }