/// <summary> /// 创建指令 /// </summary> public static void Do(int eventId) { var command = new TriggerEventCommand(); command.EventId = eventId; var sequence = GameEntry.Command.Sequence(); sequence.AppendCommand(command); sequence.AppendCommand(new DataUpdatedCommand()); sequence.AppendResultHandler(command.HandleResult); }
protected override void Tick() { int eventId = Random.Range(1, 4); TriggerEventCommand.Do(eventId); }