Ejemplo n.º 1
0
    public bool IsEnable()
    {
        if (this.buttonIndex < 0)
        {
            return(false);
        }
        if (target == null)
        {
            return(false);
        }
        int buttonIndex = this.buttonIndex;

        SkillInfo.SkillParam skillParam = target.skillInfo.GetSkillParam(buttonIndex);
        if (skillParam == null || !skillParam.IsActiveType())
        {
            return(false);
        }
        SelfController selfController = target.controller as SelfController;

        if (selfController == null)
        {
            return(false);
        }
        if (selfController.IsCancelNextNotCancel())
        {
            return(false);
        }
        return(target.IsActSkillAction(buttonIndex));
    }
Ejemplo n.º 2
0
 public void SetButtonIndex(int button_index)
 {
     this.buttonIndex = button_index + target.skillInfo.weaponOffset;
     if (!(target == null))
     {
         int buttonIndex = this.buttonIndex;
         SkillInfo.SkillParam skillParam = target.skillInfo.GetSkillParam(buttonIndex);
         if (skillParam != null && skillParam.IsActiveType())
         {
             float percent = 1f - target.skillInfo.GetPercentUseGauge(buttonIndex);
             ChengeSkillType(buttonIndex, skillParam.tableData, percent);
         }
     }
 }