Exemplo n.º 1
0
        public override void Create(float x, float y)
        {
            Box = World.Create(x - 8, y - 8, 16, 16);
            Box.AddTags(CollisionTag.NoCollision);
            Box.Data = this;

            int heads = 3;

            for (int i = 0; i < heads; i++)
            {
                Heads.Add(new SnakeHydra(this, (i + 1) % heads));
            }
        }
Exemplo n.º 2
0
        public override void Create(float x, float y)
        {
            Box = World.Create(x, y, 12, 14);
            Box.AddTags(CollisionTag.Character);
            Box.Data = this;

            foreach (var weapon in Weapon.PresetWeaponList)
            {
                Inventory.Add(weapon);
            }

            WeightedList <Func <Potion> > potions = new WeightedList <Func <Potion> >()
            {
                { () => new PotionHealth(), 10 },
                { () => new PotionAntidote(), 10 },
                { () => new PotionPoison(), 10 },
                { () => new PotionIdentify(), 10 },
                { () => new PotionEnergy(), 10 },
                { () => new PotionWater(), 10 },
                { () => new PotionHolyWater(), 10 },
                { () => new PotionBlood(), 10 },
            };

            for (int i = 0; i < 20; i++)
            {
                Inventory.Add(potions.GetWeighted(Random)());
            }

            WeightedList <Func <Device> > machines = new WeightedList <Func <Device> >()
            {
                //{ () => new DeviceBrew(true), 10 },
                //{ () => new DeviceTrash(true), 10 },
                //{ () => new DeviceDuplicate(true), 10 },
                { () => new DeviceBrew(false), 10 },
                { () => new DeviceTrash(false), 10 },
                { () => new DeviceDuplicate(false), 10 },
                { () => new DeviceFlamebringer(false), 100 }
            };

            for (int i = 0; i < 5; i++)
            {
                Inventory.Add(machines.GetWeighted(Random)());
            }
        }
Exemplo n.º 3
0
        public PlayerHumper(Player playerCollider)
            : base()
        {
            Owner         = playerCollider;
            _statemanager = Scene.Current.FindComponent <GameStateManager>();

            World = GameLevel.Instance.BuildHumpermap();

            Box = World.Create(Owner.GameObj.Transform.Pos.X,
                               -Owner.GameObj.Transform.Pos.Y,
                               Owner.Collider.SizeX,
                               Owner.Collider.SizeY);
            Box.AddTags(HumperColliderTags.Player);
            Box.Data   = Owner.GameObj.GetComponent <Player>();
            ignoreSelf = new List <IBox> {
                Box
            };

            Logs.Game.Write("PlayerHumper created at {0}/{1} as a {2}/{3} wide box", Box.X, Box.Y, Box.Width, Box.Height);
        }
Exemplo n.º 4
0
 public Crate(Box box)
 {
     this._box      = box.AddTags(Tags.Group5);
     this._box.Data = this;
 }
Exemplo n.º 5
0
 public override void Create(float x, float y)
 {
     Box = World.Create(x, y, 12, 14);
     Box.AddTags(CollisionTag.Character);
     Box.Data = this;
 }