public override void CollideFrom(GameEntity owner, Node collider) { base.CollideTo(owner, collider); Type type = owner.GetType(); if (type == typeof(EnemyTurtle)) { //collied enemy } }
public override void CollideTo(GameEntity owner, Node collider) { base.CollideTo(owner, collider); Type type = owner.GetType(); if (type == typeof(EnemyBase)) { // Logger.Debug("[PlayerBullet] Collied to Enemy"); Destroy(); } }
public override void CollideTo(GameEntity owner, Node collider) { base.CollideTo(owner, collider); Type type = owner.GetType(); if (type == typeof(EnemyTurtle)) { Logger.Debug("[PlayerBullet] Collied to Enemy"); CollisionDatas.RemoveAll( (x) => x.owner==this ); Velocity *= 0.3f; SetAnimation(BodySprite, "Explosion"); } }