예제 #1
0
        public void AddProjectile(string nameMissile, float toX, float toY, bool isServerOnly = false)
        {
            Projectile p = new Projectile(
                Owner.X,
                Owner.Y,
                (int)LineWidth,
                Owner,
                new Target(toX, toY),
                this,
                ProjectileSpeed,
                (int)_rafManager.getHash(nameMissile),
                ProjectileFlags != 0 ? ProjectileFlags : Flags
                );

            _game.Map.AddObject(p);
            if (!isServerOnly)
            {
                _game.PacketNotifier.notifyProjectileSpawn(p);
            }
        }