コード例 #1
0
        public void HandleCollision(INpc enemy, IProjectile swordBeam, Constants.Direction side)
        {
            SwordBeamFlyingProjectile swordBeamCast = (SwordBeamFlyingProjectile)swordBeam;

            enemy.TakeDamage(swordBeamCast.DamageAmount());
            swordBeamCast.ExplodeSword();
        }
コード例 #2
0
        public void HandleCollision(IProjectile swordBeam, IBlock block, Constants.Direction side)
        {
            Type blockType = block.GetType();

            if (blockType == typeof(TileWater) || blockType == typeof(SecretRoomWall))
            {
                return;
            }
            SwordBeamFlyingProjectile swordBeamCast = (SwordBeamFlyingProjectile)swordBeam;

            swordBeamCast.ExplodeSword();
        }