private void OnRoleEvent(RoleEvent ev) { if (ev.Role.Antagonist && ev.Role.Mind.Session != null) { foreach (var admin in _adminManager.ActiveAdmins) { RaiseNetworkEvent(GetChangedEvent(ev.Role.Mind.Session), admin.ConnectedClient); } } }
static AdapterInstanceExpression() { //Discarded unreachable code: IL_0002, IL_0006, IL_0012, IL_0019 //IL_0003: Incompatible stack heights: 0 vs 1 //IL_0007: Incompatible stack heights: 0 vs 1 //IL_0013: Incompatible stack heights: 0 vs 1 //IL_001a: Incompatible stack heights: 0 vs 1 SingletonReader.PushGlobal(); _Getter = null; worker = null; }
public static void RemoveEvent() { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 if (_Getter != null) { _Getter._0002(); _Getter = null; GC.Collect(); } }
public static void SetEvent(int res, string pol, string dir) { //Discarded unreachable code: IL_0002 //IL_0003: Incompatible stack heights: 0 vs 1 m_Setter = pol; worker = dir; if (_Getter == null) { _Getter = new RoleEvent(new AccountInstanceExpression(WrapperIssuerImporter.serializerEvent)[res].DisableInstance()); _Getter.NewFrame += RateEvent; _Getter._0001(); } }
void LaunchEvent(RoleEvent evt) { switch (evt.Type) { case RoleEventType.PlayAnim: PlayAnimation(evt.Param); break; case RoleEventType.PlaySoundEffect: PlaySoundEffect(evt.Param); break; case RoleEventType.PlayEffect: PlayActionEffect(evt.Param); break; default: break; } }
void SelectRole(object obj) { var vocation = (int)obj; BreakRoleEvent(); for (int i = 0; i < m_createRoleData.Count; i++) { if (m_createRoleData[i]._VocationID == vocation) { m_selectRoleData = m_createRoleData[i]; } } if (m_createRolePanel != null) { Destroy(m_createRolePanel.gameObject); m_createRolePanel = null; } for (int i = 0; i < m_curRoleEffectList.Count; i++) { if (m_curRoleEffectList[i] != null) { Destroy(m_curRoleEffectList[i]); } } m_curRoleEffectList.Clear(); CancelInvoke(); Invoke("CreateRoleUI", m_selectRoleData._UIDelayTime); m_eventList.Clear(); GameObject.Destroy(m_continueNextTips); for (int i = 0; i < m_selectRoleData._AnimList.Length; i++) { RoleEvent evt = new RoleEvent(); evt.Type = RoleEventType.PlayAnim; evt.m_handled = true; evt.EventTimeAfterLaunch = 0.0f; evt.Param = i; m_eventList.Add(evt); } RoleEvent evt1 = new RoleEvent(); evt1.Type = RoleEventType.PlaySoundEffect; evt1.m_handled = true; evt1.Param = m_selectRoleData._SoundEffectList.Length == 0 ? 0 : Random.Range(0, m_selectRoleData._SoundEffectList.Length); evt1.EventTimeAfterLaunch = 0; m_eventList.Add(evt1); for (int i = 0; i < m_selectRoleData._EffectDelayTime.Length; i++) { RoleEvent evt = new RoleEvent(); evt.Type = RoleEventType.PlayEffect; evt.m_handled = true; evt.Param = i; evt.EventTimeAfterLaunch = m_selectRoleData._EffectDelayTime[i] * 0.001f; m_eventList.Add(evt); } m_onSelect = true; }