Beispiel #1
0
    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());
    }
Beispiel #2
0
 void StoppedCasting(StoppedCastingEvent e)
 {
     if (Selected)
     {
         Selected = false;
     }
 }
Beispiel #3
0
    void initializeEventCallbacks()
    {
        SpellSelectedEvent.RegisterListener(spellSelected);
        SpellUnSelectedEvent.RegisterListener(spellUnSelected);

        CastingLocationChangedEvent.RegisterListener(castingLocationChanged);
        StoppedCastingEvent.RegisterListener(stoppedCasting);
    }
Beispiel #4
0
 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);
 }
Beispiel #5
0
    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();
    }
Beispiel #6
0
 void unRegisterCallbacks()
 {
     StoppedCastingEvent.UnregisterListener(StoppedCasting);
     SpellCastEvent.UnregisterListener(SpellCast);
 }
Beispiel #7
0
    void initializeCallbacks()
    {
        StoppedCastingEvent.RegisterListener(StoppedCasting);

        SpellCastEvent.RegisterListener(SpellCast);
    }
Beispiel #8
0
 void stoppedCasting(StoppedCastingEvent e)
 {
     castingLocation = Vector2.negativeInfinity;
 }