Exemple #1
0
 public void OnEnter()
 {
     nextBuild     = Time.time;
     stats         = unit.stats;
     target        = unit.buildTarget;
     buildSpeed    = 3 - stats.GetSkillLevel("Bu") * 0.1f - (stats.attDexterity + stats.attIntelligence) * 0.025f;
     buildStrength = 10 + stats.GetSkillLevel("Bu") * 10 + ((stats.attDexterity * 0.5f) + stats.attStrength) * 0.1f;
 }
 public void MoveTo(Vector3 _destination, float _stopDistance)
 {
     if (!moving)
     {
         currentTask    = unitTask.Move;
         clickTarget    = _destination;
         stopDistance   = _stopDistance;
         resourceTarget = null;
         buildTarget    = null;
         clickMove      = true;
     }
 }
 public void SetBuildTarget(BuildFence _target)
 {
     currentTask  = unitTask.Build;
     buildTarget  = _target;
     stopDistance = _target.interactionRadius;
 }