示例#1
0
    public void Launch(ShooterCreature shooterCreature, Vector2 velocity)
    {
        this.shooterCreature = shooterCreature;
        this.velocity        = velocity;

        m_rigidbody2D          = GetComponent <Rigidbody2D>();
        m_rigidbody2D.velocity = velocity;

        launchHitbox.enabled = true;
        launchHitbox.GetComponent <Hitbox>().direction = velocity.normalized;
    }
示例#2
0
 public override void ChildHitboxEnterEvent(Collider2D collision, Hitbox hitbox)
 {
     if (collision.CompareTag("Enemy"))
     {
         ShooterCreature shooterCreature = collision.GetComponent <ShooterCreature>();
         if (shooterCreature != null)
         {
             shooterCreature.OnHitboxEvent(hitbox, 20);
             //controller.Die();
         }
     }
 }