void castingStopped(StoppedCastingEvent e) { isCasting = false; if (fadingIn) { StopCoroutine(FadeIn()); fadingIn = false; } //if(staminaCost != - 1) //{ // float percent = (float)stamina / maxStamina; // int index = pixelList.Count - (int)(percent * pixelList.Count); // for(int i = 0; i <= index; i++) // { // if(i < pixelList.Count) // { // Vector2 position = pixelList[i]; // staminaTex.SetPixel((int)position.x, (int)position.y, fillColor); // } // } //} StartCoroutine(FadeOut()); }
void StoppedCasting(StoppedCastingEvent e) { if (Selected) { Selected = false; } }
void initializeEventCallbacks() { SpellSelectedEvent.RegisterListener(spellSelected); SpellUnSelectedEvent.RegisterListener(spellUnSelected); CastingLocationChangedEvent.RegisterListener(castingLocationChanged); StoppedCastingEvent.RegisterListener(stoppedCasting); }
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 unRegisterCallbacks() { StoppedCastingEvent.UnregisterListener(StoppedCasting); SpellCastEvent.UnregisterListener(SpellCast); }
void initializeCallbacks() { StoppedCastingEvent.RegisterListener(StoppedCasting); SpellCastEvent.RegisterListener(SpellCast); }
void stoppedCasting(StoppedCastingEvent e) { castingLocation = Vector2.negativeInfinity; }