public static void OnUpdateCommand(ref YotogiPlay.PlayerState playerState, ref Dictionary <YotogiPlay.PlayerState, Yotogi.SkillData.Command.Data[]> commandDictionary, ref YotogiCommandFactory commandFactory) { CommandUpdateEventArgs args = new CommandUpdateEventArgs { CommandFactory = commandFactory, Commands = commandDictionary, PlayerState = playerState }; CommandUpdate?.Invoke(null, args); }
private bool Yotogi_initialize() { // デバイスオープン OpenVorzeDevices(); //メイドを取得 this.maid = GameMain.Instance.CharacterMgr.GetMaid(0); if (!this.maid) { return(false); } // 夜伽コマンドフック { this.yotogiManager = getInstance <YotogiManager>(); if (!this.yotogiManager) { return(false); } this.yotogiPlayManager = getInstance <YotogiPlayManager>(); if (!this.yotogiPlayManager) { return(false); } YotogiCommandFactory cf = getFieldValue <YotogiPlayManager, YotogiCommandFactory>(this.yotogiPlayManager, "command_factory_"); if (IsNull(cf)) { return(false); } try { //YotogiPlayManagerのコールバック cf.SetCommandCallback(new YotogiCommandFactory.CommandCallback(this.OnYotogiPlayManagerOnClickCommand)); } catch (Exception ex) { DebugManager.Log(string.Format("Error - SetCommandCallback() : {0}", ex.Message)); return(false); } this.orgOnClickCommand = getMethodDelegate <YotogiPlayManager, Action <Yotogi.SkillData.Command.Data> >(this.yotogiPlayManager, "OnClickCommand"); if (IsNull(this.orgOnClickCommand)) { return(false); } } return(true); }
public static void OnUpdateCommand(ref YotogiPlay.PlayerState playerState, ref Dictionary<YotogiPlay.PlayerState, Yotogi.SkillData.Command.Data[]> commandDictionary, ref YotogiCommandFactory commandFactory) { CommandUpdateEventArgs args = new CommandUpdateEventArgs { CommandFactory = commandFactory, Commands = commandDictionary, PlayerState = playerState }; CommandUpdate?.Invoke(args); }