Пример #1
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel()
        {
            Level = new Level();

            CreateCommands();

            Load();
        }
Пример #2
0
 public void PopulateView(Level model)
 {
     Level = model;
     Enemies = model.Enemies;
 }
Пример #3
0
 public void DefaultLevel()
 {
     Level model = new Level();
     model.Enemies = new ObservableCollection<Enemy>
     {
         new Enemy()
         {
             TypeName = "ZomBear",
             Health = 100,
             MoveSpeed = 2.5f,
             Damage = 15,
             AttackSpeed = 0.5f,
             ScoreValue = 10,
             SpawnTime = 3
         },
         new Enemy()
         {
             TypeName = "ZomBunny",
             Health = 100,
             MoveSpeed = 3f,
             Damage = 10,
             AttackSpeed = 0.5f,
             ScoreValue = 10,
             SpawnTime = 3
         },
         new Enemy()
         {
             TypeName = "Hellephant",
             Health = 100,
             MoveSpeed = 2f,
             Damage = 30,
             AttackSpeed = 0.5f,
             ScoreValue = 50,
             SpawnTime = 15
         }
     };
     model.EnemyTypes = new ObservableCollection<string>()
     {
         "ZomBear",
         "ZomBunny",
         "Hellephant"
     };
     PopulateView(model);
 }