Esempio n. 1
0
        public override void CollideFrom(GameEntity owner, Node collider)
        {
            base.CollideTo(owner, collider);

            Type type = owner.GetType();
            if (type == typeof(EnemyTurtle))
            {
                //collied enemy
            }
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
        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");
            }
        }