public CommandExcuted(ICommandExecuter pManagerCommand, CommandBase pCommandExcuted, SInputValue sInputValue, float fExcuteTime)
 {
     this.pManagerCommand = pManagerCommand;
     this.pCommandExcuted = pCommandExcuted;
     this.sInputValue     = sInputValue;
     this.fExcuteTime     = fExcuteTime;
 }
    public void ICommandExecuter_Update(ref List <CommandExcuted> listCommandExecute_Default_Is_Empty)
    {
        float fTime           = Time.time;
        var   listCommandInfo = p_pInputEventV2.listCommandInfo;

        foreach (var pCommandInfo in listCommandInfo)
        {
            CommandBase pCommand = pCommandInfo.pCommand;
            if (pCommand == null || pCommand.bIsInit == false)
            {
                continue;
            }

            SInputValue sValue = pCommandInfo.pInputInfoGroup.DoCalculate_Relate();
            if (sValue.bIsInput == false)
            {
                continue;
            }

            pCommand.DoExcute(ref sValue);

            CommandExcuted pCommandExecuteData = new CommandExcuted(this, pCommand, sValue, fTime);

            listCommandExecute_Default_Is_Empty.Add(pCommandExecuteData);
            p_Event_OnExecuteCommand.DoNotify(new ICommandExecuteArg(pCommandExecuteData));
        }
    }
    public bool DoExcute(ref SInputValue sValue)
    {
        bool bIsExcuted = true;

        DoExcute(ref sValue, ref bIsExcuted);

        return(bIsExcuted);
    }
    static public SInputValue operator |(SInputValue pValueA, SInputValue pValueB)
    {
        SInputValue pValue = new SInputValue();

        pValue.bIsAlwaysInput = pValueA.bIsAlwaysInput || pValueB.bIsAlwaysInput;
        pValue.bIsInput       = pValueA.bIsInput || pValueB.bIsInput;
        if (pValue.bIsInput)
        {
            pValue.bValue = pValueA.bValue || pValueB.bValue;
            pValue.fAxisValue_Minus1_1 = pValueA.fAxisValue_Minus1_1 + pValueB.fAxisValue_Minus1_1;
        }

        return(pValue);
    }
示例#5
0
    public void ICommandExecuter_Update(ref List <CommandExcuted> listCommandExecute_Default_Is_Empty)
    {
        timeSinceLastSpawned += Time.deltaTime;
        if (timeSinceLastSpawned >= spawnRate)
        {
            timeSinceLastSpawned = 0f;

            float       spawnYPosition = Random.Range(columnMin, columnMax);
            SInputValue sInput         = new SInputValue(false, false, spawnYPosition, Vector2.zero, false);
            bool        bExecute       = true;
            _pCommand_SetColumn.DoExcute(ref sInput, ref bExecute);

            if (bExecute)
            {
                CommandExcuted pCommandExecute = new CommandExcuted(this, _pCommand_SetColumn, sInput, Time.time);
                listCommandExecute_Default_Is_Empty.Add(pCommandExecute);
                p_Event_OnExecuteCommand.DoNotify(new ICommandExecuteArg(pCommandExecute));
            }
        }
    }
示例#6
0
 public override void DoExcute(ref SInputValue sInputValue, ref bool bIsExcuted_DefaultIsTrue)
 {
     pColumnPool_Replay.SetColumn(sInputValue.fAxisValue_Minus1_1);
 }
示例#7
0
 public override void DoExcute(ref SInputValue sInputValue, ref bool bIsExcuted_DefaultIsTrue)
 {
     pColumnPool_Replay.ResetColumn();
 }
 virtual public void DoExcute_Undo(ref SInputValue sInputValue)
 {
 }
 abstract public void DoExcute(ref SInputValue sInputValue, ref bool bIsExcuted_DefaultIsTrue);
 public override void DoExcute(ref SInputValue sInputValue, ref bool bIsExcuted_DefaultIsTrue)
 {
     Debug.Log("3");
 }
示例#11
0
 public override void DoExcute(ref SInputValue sInputValue, ref bool bIsExcuted_DefaultIsTrue)
 {
     _pBird?.Jump();
 }
 public override void DoExcute(ref SInputValue sInputValue, ref bool bIsExcuted_DefaultIsTrue)
 {
     _pPlayerMove.DoMove(new Vector2(sInputValue.fAxisValue_Minus1_1, 0f));
     Debug.LogError("MovePlayer_Character Axis : " + sInputValue.fAxisValue_Minus1_1);
 }