void initializeEventCallbacks() { StartedCastingEvent.RegisterListener(castingStarted); StoppedCastingEvent.RegisterListener(castingStopped); SpellSelectedEvent.RegisterListener(SpellSelected); SpellCastEvent.RegisterListener(SpellCast); SpellUnSelectedEvent.RegisterListener(SpellUnselected); CastingProjectionDestroyedEvent.RegisterListener(CastingProjectionDestroyed); CastingProjectionCreatedEvent.RegisterListener(CastingProjectionCreated); CastingLocationChangedEvent.RegisterListener(CastingLocationChanged); }
void StopCasting() { Animate.ChangeAnimationState("Idle", animator, currentDirection); casting = false; Destroy(CastingCircleProjection); CastingCircleProjection = null; CastingProjectionDestroyedEvent e = new CastingProjectionDestroyedEvent(); e.FireEvent(); castingLocationChanged = false; StoppedCastingEvent ev = new StoppedCastingEvent(); ev.FireEvent(); }
void castingProjectionDestroyed(CastingProjectionDestroyedEvent e) { currentObject = player; }
// All callback functions the camera recieves #region Callback functions void initializeCallbackFunctions() { CastingProjectionDestroyedEvent.RegisterListener(castingProjectionDestroyed); CastingProjectionCreatedEvent.RegisterListener(castingProjectionCreated); CastingLocationChangedEvent.RegisterListener(castingLocationChanged); }
void CastingProjectionDestroyed(CastingProjectionDestroyedEvent e) { castingProjectionActive = false; }