Ejemplo n.º 1
0
 protected override void Start()
 {
     base.Start();
     isClosed    = false;
     lootManager = GameObject.FindGameObjectWithTag("LootManager").GetComponent <LootManager>();
     loot        = lootManager.GenerateLoot("Box");
 }
Ejemplo n.º 2
0
 public static void DoBattle()
 {
     if (State.Enemy.MaximumHP == 0)
     {
         Log.Add($"Patrolling for baddies...", () => { MonsterManager.GetEnemy(); });
     }
     else if (State.Enemy.CurrentHP <= 0)
     {
         Log.Add(State.Enemy.Name + " slain!  Looting...", () => { LootManager.GenerateLoot(); QuestManager.KilledAMonster(); });
     }
     else
     {
         var mySwing    = rng.Next((int)State.Player.DmgMin, (int)State.Player.DmgMax);
         var enemySwing = rng.Next((int)State.Enemy.DmgMin, (int)State.Enemy.DmgMax);
         Log.Add($"Hit for {mySwing}.  Took {enemySwing} damage.", () => { State.Player.HP -= enemySwing; State.Enemy.CurrentHP -= mySwing; });
     }
 }
Ejemplo n.º 3
0
 private void Dead()
 {
     isLootable = true;
     items      = lootManager.GenerateLoot(creatureName);
 }