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 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)); } } }
public ICommandExecuteArg(CommandExcuted pCommandExecuted) { this.pCommandExecuted = pCommandExecuted; }