示例#1
0
 /// <summary>
 /// Updates the Danmaku controlled by the controller instance.
 /// </summary>
 /// <param name="danmaku">the bullet to update.</param>
 /// <param name="dt">the change in time since the last update</param>
 public void Update(Danmaku danmaku, float dt)
 {
     if (danmaku.frames > frames)
     {
         danmaku.Deactivate();
     }
 }
示例#2
0
 /// <summary>
 /// Called when the player collides with a bullet.
 /// </summary>
 /// <param name="danmaku">The bullet that the player collided with</param>
 /// <param name="info">Information about the collision</param>
 protected override void DanmakuCollision(Danmaku danmaku, RaycastHit2D info)
 {
     if (danmaku.Tag != "Laser")
     {
         danmaku.Deactivate();
     }
     if (!dashing && !invincible)
     {
         Hit();
     }
 }
 /// <summary>
 /// Handles a Danmaku collision. Only ever called with Danmaku that pass the filter.
 /// </summary>
 /// <param name="danmaku">the danmaku that hit the collider.</param>
 /// <param name="info">additional information about the collision</param>
 protected override void DanmakuCollision(Danmaku danmaku, RaycastHit2D info)
 {
     danmaku.Deactivate();
 }