Пример #1
0
 public Debuff(CreepStats theTarget, int theAmount, int theDuration)
     : this(theTarget, theAmount, theDuration, false)
 {
     Target = theTarget;
     Amount = theAmount;
     Duration = theDuration;
 }
Пример #2
0
 public Debuff(CreepStats theTarget, int theAmount, int theDuration, bool isInstance)
 {
     Target = theTarget;
     Amount = theAmount;
     Duration = theDuration;
     IsCreepInstance = isInstance;
 }
Пример #3
0
 public Debuff(CreepStats theTarget, int theAmount, int theDuration, bool isInstance)
 {
     Target          = theTarget;
     Amount          = theAmount;
     Duration        = theDuration;
     IsCreepInstance = isInstance;
 }
Пример #4
0
 public Debuff(CreepStats theTarget, int theAmount, int theDuration)
     : this(theTarget, theAmount, theDuration, false)
 {
     Target   = theTarget;
     Amount   = theAmount;
     Duration = theDuration;
 }
Пример #5
0
 /// <summary>
 /// Get a CreepStat from this instance.
 /// </summary>
 /// <param name="key">The CreepStat to retrieve a value of.</param>
 /// <returns>The value of the given CreepStat or null if given an invalid key.</returns>
 public int GetStat(CreepStats key)
 {
     if (Stats.ContainsKey(key))
     {
         return(Stats[key]);
     }
     else
     {
         return(-1);
     }
 }
Пример #6
0
 void Start()
 {
     agent             = GetComponent <NavMeshAgent>();
     player            = GameObject.Find("Player").transform;
     parentCheckpoints = GameObject.Find("Checkpoints").transform;
     anim       = GetComponent <Animator>();
     playerNeck = player.Find("Neck");
     eyes       = transform.Find("eyes");
     for (int i = 0; i < parentCheckpoints.childCount; i++)
     {
         checkpoints.Add(parentCheckpoints.GetChild(i));
     }
     nextCheckpoint    = 0;
     hasAcquiredPlayer = false;
     angularSpeed      = agent.angularSpeed;
     stats             = new CreepStats();
     stats.healthCap   = 100f;
     stats.staminaCap  = 100f;
     stats.onSpawn();
     StartCoroutine(Patrol());
 }
Пример #7
0
 public static Debuff GetInstance(CreepStats theTarget, int theAmount, int theDuration)
 {
     return new Debuff(theTarget, theAmount, theDuration, true);
 }
Пример #8
0
 public static Debuff GetInstance(CreepStats theTarget, int theAmount, int theDuration)
 {
     return(new Debuff(theTarget, theAmount, theDuration, true));
 }
Пример #9
0
 private void Awake()
 {
     _unit  = GetComponent <Unit>();
     _stats = GetComponent <CreepStats>();
 }
Пример #10
0
 /// <summary>
 /// Get a CreepStat from this instance.
 /// </summary>
 /// <param name="key">The CreepStat to retrieve a value of.</param>
 /// <returns>The value of the given CreepStat or null if given an invalid key.</returns>
 public int GetStat(CreepStats key)
 {
     if (Stats.ContainsKey(key))
     {
         return Stats[key];
     }
     else
     {
         return -1;
     }
 }