예제 #1
0
 void HandleGetKeyUpEvent(SKILL _skill)
 {
     if (_skill.need_dir)
     {
         _skill.SetDirection(Dir);
     }
     if (_skill.need_pos)
     {
         if (_skill.IsPosValid(Pos))
         {
             Debug.Log("PosValid");
             Debug.Log(Pos);
             _skill.SetTargetPos(Pos);
         }
         else
         {
             Debug.Log("PosInValid");
             Debug.Log(Pos);
             //位置不在距离范围内,做异常处理 放在主角所在位置?  纸张还是要被使用
             _skill.SetTargetPos(this.transform.position);
         }
         Debug.Log("Already SetTargetPos:");
         Debug.Log(Pos);
         //UI显示位置
         highlightPosCube.SetActive(true);
         highlightPosCube.transform.position = Pos;
     }
     this.GetComponent <InfoControl>().next_skill_to_begin = _skill;
     highlightPosCube.SetActive(false);
 }
예제 #2
0
 void HandleGetKeyEvent(SKILL _skill)
 {
     Debug.Log(_skill.getSkillName());
     if (_skill.need_dir)
     {
         //从UI实时接收方向信息
         //UI显示方向
         Dir = new Vector3(1.0f, 0.0f, 1.0f);// 应该用户输入,方向y轴分量应该是0
     }
     if (_skill.need_pos)
     {
         //从UI实时接收位置信息
         Pos = GetSkillTgtPos();
         if (_skill.IsPosValid(Pos))
         {
             Debug.Log("PosValid");
             Debug.Log(Pos);
             //UI显示位置
             highlightPosCube.SetActive(true);
             highlightPosCube.transform.position = Pos;
         }
     }
 }