Example #1
0
    private bool IsEnable(int index)
    {
        if (requestCheck)
        {
            return(false);
        }
        if (targetPlayer.isDead)
        {
            return(false);
        }
        if (targetPlayer.weaponIndex == index)
        {
            return(false);
        }
        if (!MonoBehaviourSingleton <StatusManager> .IsValid())
        {
            return(false);
        }
        SelfController selfController = targetPlayer.controller as SelfController;

        if (selfController == null)
        {
            return(false);
        }
        if (selfController.nextCommand != null && selfController.nextCommand.type == SelfController.COMMAND_TYPE.CHANGE_WEAPON)
        {
            return(false);
        }
        return(true);
    }
    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));
    }
Example #3
0
 public void ChangeWeapon(int index)
 {
     if (IsEnable(index))
     {
         SelfController selfController = targetPlayer.controller as SelfController;
         if (!(selfController == null))
         {
             selfController.OnWeaponChangeButtonPress(index);
         }
     }
 }
    private bool IsSelfCommandCheck()
    {
        int            buttonIndex    = this.buttonIndex;
        SelfController selfController = target.controller as SelfController;

        if (selfController == null)
        {
            return(false);
        }
        if (selfController.nextCommand != null && selfController.nextCommand.type == SelfController.COMMAND_TYPE.SKILL && selfController.nextCommand.skillIndex == buttonIndex)
        {
            return(true);
        }
        return(false);
    }
 public void OnClick()
 {
     if (this.buttonIndex >= 0 && !(target == null))
     {
         SelfController selfController = target.controller as SelfController;
         if (!(selfController == null) && !selfController.IsCancelNextNotCancel())
         {
             int buttonIndex = this.buttonIndex;
             if (selfController.OnSkillButtonPress(buttonIndex))
             {
                 requestCheck          = true;
                 skillButton.isEnabled = false;
                 btnEnable             = false;
             }
         }
     }
 }
Example #6
0
    private bool IsSelfCommandCheck()
    {
        if (targetPlayer.actionID == (Character.ACTION_ID) 25)
        {
            return(true);
        }
        SelfController selfController = targetPlayer.controller as SelfController;

        if (selfController == null)
        {
            return(false);
        }
        if (selfController.nextCommand != null && selfController.nextCommand.type == SelfController.COMMAND_TYPE.CHANGE_WEAPON)
        {
            return(true);
        }
        return(false);
    }
    public bool IsEnable()
    {
        if (!MonoBehaviourSingleton <StageObjectManager> .IsValid())
        {
            return(false);
        }
        if (target == null)
        {
            return(false);
        }
        SelfController selfController = target.controller as SelfController;

        if (selfController == null)
        {
            return(false);
        }
        if (!MonoBehaviourSingleton <InGameSettingsManager> .IsValid())
        {
            return(false);
        }
        return(true);
    }