Пример #1
0
        public Layer AddLayer(string layerName)
        {
            Layer layer = new Layer();
            layer.Name = layerName;

            return this.AddLayer(layer);
        }
Пример #2
0
        public Weapon(Layer bulletLayer)
        {
            this.WeaponType = new WeaponType();
            this.BulletLayer = bulletLayer;

            this.FireRate = 0;
        }
Пример #3
0
        public Player(Layer bulletLayer)
            : base(CharacterType.PLAYER)
        {
            this.BulletLayer = bulletLayer;
            this.Weapon = new Weapon(bulletLayer);

            this.LoadTexture("player");

            this.AddChild(this.Weapon);
        }
Пример #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();
        }
Пример #5
0
 public static void Initialize(Layer uiLayer)
 {
     DamageIndicator.UILayer = uiLayer;
     DamageIndicator.Pool = new Pool<DamageText>(50, false, DamageIndicator.IsTextActive, DamageIndicator.SetupText);
 }
Пример #6
0
 public Director(Player player, Level level, Layer bulletLayer)
 {
     this.Player = player;
     this.Level = level;
     this.BulletLayer = bulletLayer;
 }
Пример #7
0
        public Layer AddLayer(Layer layer)
        {
            this.Layers.Add(layer);

            return layer;
        }