Exemplo n.º 1
0
 IndicatorMesh mIndicator;//技能指示器
 public override void reset()
 {
     targetPos  = Vector3.zero;
     targetUnit = null;
     GameObject.DestroyObject(mIndicator);
     mIndicator = null;
     mSkills.Clear();
 }
Exemplo n.º 2
0
 public void showIndicator(Skill skill, Vector2 dir, float disPercent, bool end)
 {
     if (mIndicator == null)
     {
         mIndicator = mUnit.gameObject.AddComponent <IndicatorMesh>();
     }
     mIndicator.Show(skill.GS, dir, disPercent, !end);
     if (end)
     {
         Vector3 d = new Vector3(dir.x, 0, dir.y);
         targetPos = mUnit.pos + skill.GS.distance * disPercent * d;
         playSkill(skill);
     }
 }