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

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

        SpellCastEvent.RegisterListener(SpellCast);
    }
Exemplo n.º 8
0
 void stoppedCasting(StoppedCastingEvent e)
 {
     castingLocation = Vector2.negativeInfinity;
 }