Esempio n. 1
0
        public Player(List <Weapon> weapons = null) : base("You", '@', NormalColor, 0, 0, 100, 35, 25, 4)
        {
            if (weapons != null)
            {
                // Deserializing. Work around a bug where we end up with two copies of the Blaster.
                this.Weapons = weapons;
            }

            this.DirectionFacing = Direction.Up;

            if (Options.PlayerStartsWithAllDataCubes)
            {
                for (var i = DataCube.FirstDataCubeFloor; i < DataCube.FirstDataCubeFloor + DataCube.NumCubes; i++)
                {
                    var cube = DataCube.GetCube(i, new GoRogue.Coord(0, 0));
                    this.GotDataCube(cube);
                }
            }

            if (Options.StartWithAllWeapons)
            {
                foreach (var weapon in (Weapon[])Enum.GetValues(typeof(Weapon)))
                {
                    if (weapon != Weapon.Undefined && weapon != Weapon.QuantumPlasma && !Weapons.Contains(weapon))
                    {
                        this.Acquire(weapon);
                    }
                }
            }

            this.ChangeToShieldColor();

            this.GotDataCube(DataCube.GetCube(1, GoRogue.Coord.NONE));
        }
Esempio n. 2
0
 public void GotDataCube(DataCube cube)
 {
     if (!this.DataCubes.Contains(cube))
     {
         LastGameLogger.Instance.Log($"Found data cube on {cube.FloorNumber}");
         this.DataCubes.Add(cube);
     }
 }