// Token: 0x06001593 RID: 5523 RVA: 0x00078C0C File Offset: 0x00076E0C private void Update() { foreach (MecanimEvent mecanimEvent in MecanimEventManager.GetEvents(this.animatorController.GetInstanceID(), this.animator)) { if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.SendMessage(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.SendMessage(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } }
private void Update() { if ((this.timePassed += Time.deltaTime) < 0.05f) { return; } this.timePassed -= 0.05f; List <MecanimEvent> events = MecanimEventManager.GetEvents(this.animatorController.GetInstanceID(), this.animator); for (int i = 0; i < events.Count; i++) { MecanimEvent mecanimEvent = events[i]; MecanimEvent.SetCurrentContext(mecanimEvent); MecanimEventEmitTypes mecanimEventEmitTypes = this.emitType; if (mecanimEventEmitTypes != MecanimEventEmitTypes.Upwards) { if (mecanimEventEmitTypes != MecanimEventEmitTypes.Broadcast) { if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.SendMessage(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.SendMessage(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } else if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.BroadcastMessage(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.BroadcastMessage(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } else if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.SendMessageUpwards(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.SendMessageUpwards(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } MecanimEventManager.PoolEvent(mecanimEvent); } events.Clear(); }
private void Update() { var events = MecanimEventManager.GetEvents(loadedData, lastStates, animatorController.GetInstanceID(), animator); foreach (var e in events) { MecanimEvent.SetCurrentContext(e); switch (emitType) { case MecanimEventEmitTypes.Upwards: if (e.paramType != MecanimEventParamTypes.None) { SendMessageUpwards(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); } else { SendMessageUpwards(e.functionName, SendMessageOptions.DontRequireReceiver); } break; case MecanimEventEmitTypes.Broadcast: if (e.paramType != MecanimEventParamTypes.None) { BroadcastMessage(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); } else { BroadcastMessage(e.functionName, SendMessageOptions.DontRequireReceiver); } break; default: if (e.paramType != MecanimEventParamTypes.None) { SendMessage(e.functionName, e.parameter, SendMessageOptions.DontRequireReceiver); } else { SendMessage(e.functionName, SendMessageOptions.DontRequireReceiver); } break; } } }
private void Update() { List <MecanimEvent> events = MecanimEventManager.GetEvents(this.loadedData, this.lastStates, this.animatorController.GetInstanceID(), this.animator); for (int i = 0; i < events.Count; i++) { MecanimEvent mecanimEvent = events[i]; MecanimEvent.SetCurrentContext(mecanimEvent); MecanimEventEmitTypes mecanimEventEmitTypes = this.emitType; if (mecanimEventEmitTypes != MecanimEventEmitTypes.Upwards) { if (mecanimEventEmitTypes != MecanimEventEmitTypes.Broadcast) { if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.SendMessage(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.SendMessage(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } else if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.BroadcastMessage(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.BroadcastMessage(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } else if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.SendMessageUpwards(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.SendMessageUpwards(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } }
// Token: 0x06001598 RID: 5528 RVA: 0x00078D84 File Offset: 0x00076F84 private void Update() { ICollection <MecanimEvent> events = MecanimEventManager.GetEvents(this.animatorController.GetInstanceID(), this.animator); foreach (MecanimEvent mecanimEvent in events) { MecanimEvent.SetCurrentContext(mecanimEvent); MecanimEventEmitTypes mecanimEventEmitTypes = this.emitType; if (mecanimEventEmitTypes != MecanimEventEmitTypes.Upwards) { if (mecanimEventEmitTypes != MecanimEventEmitTypes.Broadcast) { if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.SendMessage(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.SendMessage(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } else if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.BroadcastMessage(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.BroadcastMessage(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } else if (mecanimEvent.paramType != MecanimEventParamTypes.None) { base.SendMessageUpwards(mecanimEvent.functionName, mecanimEvent.parameter, SendMessageOptions.DontRequireReceiver); } else { base.SendMessageUpwards(mecanimEvent.functionName, SendMessageOptions.DontRequireReceiver); } } }
void Update() { if (mecanimEventHandler == null || animatorController == null) { return; } MecanimEvent[] events = MecanimEventManager.GetEvents(loadedData, lastStates, animatorController.GetInstanceID(), animator); foreach (MecanimEvent e in events) { MecanimEvent.SetCurrentContext(e); var m = ReflectionHelper.GetMethodRecursive(mecanimEventHandler, e.functionName); if (e.paramType == MecanimEventParamTypes.None) { m.FastInvoke(mecanimEventHandler); } else { m.FastInvoke(mecanimEventHandler, e.parameter); } } }
public static List <MecanimEvent> GetEvents(int animatorControllerId, Animator animator) { return(MecanimEventManager.GetEvents(MecanimEventManager.globalLoadedData, MecanimEventManager.globalLastStates, animatorControllerId, animator)); }