public Debuff(CreepStats theTarget, int theAmount, int theDuration) : this(theTarget, theAmount, theDuration, false) { Target = theTarget; Amount = theAmount; Duration = theDuration; }
public Debuff(CreepStats theTarget, int theAmount, int theDuration, bool isInstance) { Target = theTarget; Amount = theAmount; Duration = theDuration; IsCreepInstance = isInstance; }
/// <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); } }
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()); }
public static Debuff GetInstance(CreepStats theTarget, int theAmount, int theDuration) { return new Debuff(theTarget, theAmount, theDuration, true); }
public static Debuff GetInstance(CreepStats theTarget, int theAmount, int theDuration) { return(new Debuff(theTarget, theAmount, theDuration, true)); }
private void Awake() { _unit = GetComponent <Unit>(); _stats = GetComponent <CreepStats>(); }
/// <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; } }