override public void Update(RheaStateInput input)
 {
     if (shoot.Value)
     {
         input.shot.RheaHeavy(input.shot.startShot);
     }
 }
Exemplo n.º 2
0
    override public void Update(RheaStateInput input)
    {
        input.cc.HandlePlaceCircle();
        input.cc.HandleLastWord();

        // Spells
        if (SpellMap.Instance.GetSpellDown(input.cc.playerNumber, SpellType.INTRIN))
        {
            character.ChangeState <RheaShieldState>();
        }

        if (SpellMap.Instance.GetSpellDown(input.cc.playerNumber, SpellType.PRIM))
        {
            character.ChangeState <RheaPrimaryState>();
        }

        if (SpellMap.Instance.GetSpellDown(input.cc.playerNumber, SpellType.HEAVY))
        {
            character.ChangeState <RheaHeavyState>();
        }

        if (SpellMap.Instance.GetSpellDown(input.cc.playerNumber, SpellType.MOVE))
        {
            character.ChangeState <RheaDashState>();
        }

        HandleMoveAnimation(input);
    }
 override public void Update(RheaStateInput input)
 {
     if (shoot.Value)
     {
         input.shot.SPSpell();
     }
     ;
 }
Exemplo n.º 4
0
 override public void Update(RheaStateInput input)
 {
     if (shoot.Value)
     {
         input.shot.RheaHeavy(input.shot.startShot);
         AudioManager.instance.Play("RheaLastWordSequence");
     }
 }
Exemplo n.º 5
0
    override public void Enter(RheaStateInput input, CharacterStateTransitionInfo transitionInfo = null)
    {
        direction   = input.cc.LastDirection.normalized;
        travelTimer = input.dashDuration;
        dashSpeed   = input.dashSpeed;

        input.anim.Play("Dash");
    }
Exemplo n.º 6
0
    override public void Enter(RheaStateInput input, CharacterStateTransitionInfo transitionInfo = null)
    {
        input.slowSprite.enabled = false;

        direction   = input.cc.LastDirection.normalized;
        travelTimer = input.dashDuration;
        dashSpeed   = input.dashSpeed;

        AudioManager.instance.Play("RheaDash");
        input.anim.Play("Dash");
    }
Exemplo n.º 7
0
 override public void Update(RheaStateInput input)
 {
     if (shield == null)
     {
         if (character.softTransitionChangeState != null)
         {
             character.softTransitionChangeState();
         }
         else
         {
             character.ChangeState <RheaIdleState>();
         }
     }
     AudioManager.instance.Play("RheaIntrinsicShieldAway");
     HandleMoveAnimation(input);
 }
Exemplo n.º 8
0
    override public void Update(RheaStateInput input)
    {
        if (SpellMap.Instance.GetSpellDown(input.cc.playerNumber, SpellType.PRIM))
        {
            MatchManager.Instance.StartLastWord(input.cc.playerNumber);
        }
        if (shield == null)
        {
            if (character.softTransitionChangeState != null)
            {
                character.softTransitionChangeState();
            }
            else
            {
                character.ChangeState <RheaIdleState>();
            }
        }

        HandleMoveAnimation(input);
    }
Exemplo n.º 9
0
    override public void Update(RheaStateInput input)
    {
        travelTimer -= Time.deltaTime;
        character.transform.position = Vector2.Lerp(transitionInfo.moveDestination, travelOrigin, travelTimer / transitionInfo.moveTime);

        if (travelTimer <= 0)
        {
            transitionInfo.onCompleteMove(() =>
            {
                if (transitionInfo.isLastWordCaster)
                {
                    character.ChangeState <RheaLastWordState>();
                }
                else
                {
                    character.ChangeState <RheaIdleState>();
                }
            });
        }
    }
Exemplo n.º 10
0
    override public void Update(RheaStateInput input)
    {
        travelTimer -= Time.deltaTime;
        character.transform.position += direction * Time.deltaTime * dashSpeed;
        List <Collider2D> contactList = new List <Collider2D>();

        input.cc2d.OverlapCollider(new ContactFilter2D(), contactList);
        bool collidesWithWall = false;

        foreach (Collider2D collider in contactList)
        {
            if (collider.gameObject.TryGetComponent <InnerCollider>(out InnerCollider component))
            {
                collidesWithWall = true;
                break;
            }
        }
        if (travelTimer <= 0 || collidesWithWall)
        {
            character.ChangeState <RheaIdleState>();
        }
    }
 override public void Enter(RheaStateInput input, CharacterStateTransitionInfo transitionInfo = null)
 {
     input.anim.Play("Cast");
 }
Exemplo n.º 12
0
 override public void Enter(RheaStateInput input, CharacterStateTransitionInfo info = null)
 {
     prevHorizontalMovement = 0;
     input.anim.Play("Idle");
 }
Exemplo n.º 13
0
 override public void Enter(RheaStateInput input, CharacterStateTransitionInfo transitionInfo = null)
 {
     this.transitionInfo = (ForceMoveTransitionInfo)transitionInfo;
     travelOrigin        = character.transform.position;
     travelTimer         = this.transitionInfo.moveTime;
 }
Exemplo n.º 14
0
    override public void Update(RheaStateInput input)
    {

    }
Exemplo n.º 15
0
 override public void Enter(RheaStateInput input, CharacterStateTransitionInfo transitionInfo = null)
 {
     shield = UnityEngine.Object.Instantiate(input.shieldPrefab, character.transform);
 }
Exemplo n.º 16
0
 override public void Enter(RheaStateInput input, CharacterStateTransitionInfo transitionInfo = null)
 {
     input.anim.Play("Cast");
     AudioManager.instance.Play("RheaSpellCasting1");
 }
Exemplo n.º 17
0
 override public void FixedUpdate(RheaStateInput input)
 {
     input.cc.HandleMovement();
 }
Exemplo n.º 18
0
 override public void SoftTransitionWarning(RheaStateInput input)
 {
     GameObject.Destroy(shield);
 }
Exemplo n.º 19
0
 override public void SoftTransitionWarning(RheaStateInput input)
 {
     input.ch.vulnerable = true;
     input.lw.enabled = false;
     character.softTransitionChangeState(); // Go willingly into that good night
 }
Exemplo n.º 20
0
 override public void Enter(RheaStateInput input, CharacterStateTransitionInfo transitionInfo = null)
 {
     shield = UnityEngine.Object.Instantiate(input.shieldPrefab, character.transform);
     AudioManager.instance.Play("RheaIntrinsicShield");
 }
Exemplo n.º 21
0
 override public void Enter(RheaStateInput input, CharacterStateTransitionInfo info = null)
 {
     input.anim.Play("Idle");
     input.ch.vulnerable = false;
     input.lw.enabled = true;
 }