Human.cs 939 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using RPG_Fight_Test.Assets.Scripts.Weapons;
  4. using UnityEngine;
  5. public class Human : Creature {
  6. // Start is called before the first frame update
  7. void Start() {
  8. Dex = Random.Range(0, 100);
  9. movementRate = 30;
  10. CreatureHealth = Random.Range(20, 30);
  11. CurrentHealth = CreatureHealth;
  12. MaxHealth = CreatureHealth;
  13. IsCreatureAlive = true;
  14. PrimaryWeapon = new ShortSword();
  15. PrimaryWeapon.AttackProficiency = 45;
  16. Evade = 20;
  17. }
  18. // Update is called once per frame
  19. void Update() {
  20. }
  21. public override void DecideActions(List<Creature> combatants) {
  22. SetFirstAction(new AttackAction(this, combatants[0]));
  23. SetSecondAction(new AttackAction(this, combatants[0]));
  24. }
  25. public override IAction ActionWhenBlocked(Creature blockingCreature) {
  26. return null;
  27. }
  28. }