示例#1
0
 public override bool OnSelectSkill(EnumSkillType eType, int unSkillId)
 {
     Debug.Log("Use Skill Select Skill");
     if (unSkillId == -1)
     {
         ActionState.Singleton.ChangeState(enumSubActionState.eSubActionState_Enable);
         return(true);
     }
     if (this.m_curState.OnSelectSkill(eType, unSkillId))
     {
         return(true);
     }
     if (this.ChangeSkill(eType, unSkillId))
     {
         SkillBase             skill     = null;
         EnumErrorCodeCheckUse errorCode = skill.CheckUse(Singleton <BeastRole> .singleton.Id);
         if (errorCode == EnumErrorCodeCheckUse.eCheckErr_Success)
         {
             this.m_curState.OnLockOperation();
         }
         else
         {
             this.m_curState.ShowErrCheckUse(errorCode);
             ActionState.Singleton.ChangeState(enumSubActionState.eSubActionState_Enable);
         }
     }
     return(true);
 }
示例#2
0
    public virtual void UpdateState()
    {
        Debug.Log("UpdateState");
        float y   = Input.mousePosition.y;
        float num = y / Screen.height;

        if (num > 0.27f && !this.m_bOutMainUI)
        {
            SkillBase skill = SkillGameManager.GetSkillBase(this.m_unSkillId);
            if (skill != null)
            {
                EnumErrorCodeCheckUse errorCode = skill.CheckUse(Singleton <BeastRole> .singleton.Id);
                if (errorCode != EnumErrorCodeCheckUse.eCheckErr_Success)
                {
                    this.ShowErrCheckUse(errorCode);
                }
                else
                {
                    this.m_bOutMainUI = true;
                    //当鼠标离开UI做的处理
                }
            }
        }
        if (num < 0.25f && this.m_bOutMainUI)
        {
            this.m_bOutMainUI = false;
            //当鼠标进入UI做的处理
        }
    }
示例#3
0
    /// <summary>
    /// 当使用技能不正确的时候做的处理
    /// </summary>
    public void ShowErrCheckUse(EnumErrorCodeCheckUse errorCode)
    {
        string content = StringConfigMgr.GetString(errorCode.ToString());

        DlgBase <DlgFlyText, DlgFlyTextBehaviour> .singleton.AddSystemInfo(content);
    }
 /// <summary>
 /// 当使用技能不正确的时候做的处理
 /// </summary>
 public void ShowErrCheckUse(EnumErrorCodeCheckUse errorCode)
 {
 }