Exemple #1
0
        public PlayerConfigurator AddPistol()
        {
            WeaponsFacotry naujas;

            naujas = new WeaponsFacotry();
            Weapon Temp = naujas.CreateWeapon("P");

            this.player.addGuns(Temp);
            return(this);
        }
Exemple #2
0
        public void Setup()
        {
            var options = new DbContextOptionsBuilder <PlayerContext>().UseInMemoryDatabase(databaseName: "PlayerList").Options;

            Database = new PlayerContext(options);
            Command  = new List <ICommand>();
            Player   = new Player {
                health_points = 100, Name = "Julius", speed = 10, PosX = 100, PosY = 100
            };
            Weapon = new Weapon {
                PlayerID = 0, cost = 100, damage = 75
            };
            Command.Add(new UpCommand(Player));
            Command.Add(new DownCommand(Player));
            Command.Add(new LeftCommand(Player));
            Command.Add(new RightCommand(Player));
            ObsFactory     = new ObsticaleFacotry();
            WeaponsFacotry = new WeaponsFacotry();
            Shop           = new ShopFacade();
        }