public Layer AddLayer(string layerName)
        {
            Layer layer = new Layer();
            layer.Name = layerName;

            return this.AddLayer(layer);
        }
Exemple #2
0
        public Weapon(Layer bulletLayer)
        {
            this.WeaponType = new WeaponType();
            this.BulletLayer = bulletLayer;

            this.FireRate = 0;
        }
Exemple #3
0
        public Player(Layer bulletLayer)
            : base(CharacterType.PLAYER)
        {
            this.BulletLayer = bulletLayer;
            this.Weapon = new Weapon(bulletLayer);

            this.LoadTexture("player");

            this.AddChild(this.Weapon);
        }
Exemple #4
0
        public Bullet(Layer bulletLayer, BulletType bulletType)
        {
            this.Collidable = true;
            this.BulletType = bulletType;

            ParticleEffect effect = GameManager.Content.Load<ParticleEffect>(@"ParticleEffects/smoke1");
            this.ParticleEngine = new ParticleEngine(effect);
            bulletLayer.AddChild(this.ParticleEngine);

            ParticleEffect effect2 = GameManager.Content.Load<ParticleEffect>(@"ParticleEffects/smokePuff");
            this.ExplosionParticles = new ParticleEngine(effect2);
            bulletLayer.AddChild(this.ExplosionParticles);

            this.LoadTexture(this.BulletType.TextureName);
            this.AddCollisionGroup("bullet");
            this.Deactivate();
        }
 public static void Initialize(Layer uiLayer)
 {
     DamageIndicator.UILayer = uiLayer;
     DamageIndicator.Pool = new Pool<DamageText>(50, false, DamageIndicator.IsTextActive, DamageIndicator.SetupText);
 }
Exemple #6
0
 public Director(Player player, Level level, Layer bulletLayer)
 {
     this.Player = player;
     this.Level = level;
     this.BulletLayer = bulletLayer;
 }
        public Layer AddLayer(Layer layer)
        {
            this.Layers.Add(layer);

            return layer;
        }