Ejemplo n.º 1
0
    //*******************************
    //BEGIN CURSOR METHODS
    //*******************************
    // public override void SetHoverState(GameObject hoverObject) {
    //  base.SetHoverState(hoverObject);
    // }
    //*******************************
    //END CURSOR METHODS
    //*******************************

    public override void AnimationClimaxPoint(RTS.EAnimation action)
    {
        if (unitState != null)
        {
            unitState.AnimationClimaxEvent(action);
        }
    }
Ejemplo n.º 2
0
 public override void AnimationEndPoint(RTS.EAnimation action)
 {
     if (unitState != null)
     {
         unitState.AnimationCompletionEvent(action);
     }
 }
Ejemplo n.º 3
0
 public override void AnimationClimaxEvent(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Build)
     {
         unit.builder.BuildExecution();
     }
 }
Ejemplo n.º 4
0
 public override void AnimationClimaxEvent(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Revive)
     {
         unit.reviver.ReviveExecution();
         SelfExitState(RTS.EAnimation.Revive);
     }
 }
Ejemplo n.º 5
0
 public override void AnimationCompletionEvent(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Attack)
     {
         unit.attacker.AttackIterationComplete();
         CheckForAttackContinuation();
     }
 }
Ejemplo n.º 6
0
 public override void SelfExitState(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Spawn)
     {
         base.SelfExitState(state);
         unit.SetUnitState(new IdleState(unit, false));
     }
 }
Ejemplo n.º 7
0
 public virtual void SelfExitState(RTS.EAnimation state)
 {
     if (unit.paramManager.IsDead)
     {
         return;
     }
     manuallyInitatedState = false;
 }
Ejemplo n.º 8
0
 public override void AnimationClimaxEvent(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Attack)
     {
         unit.hatcheryInteracter.InteractExecution();
         SelfExitState(RTS.EAnimation.Attack);
     }
 }
Ejemplo n.º 9
0
 public override void SelfExitState(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Revive)
     {
         base.SelfExitState(state);
         unit.mover.ClearMovement();
         unit.SetUnitState(new IdleState(unit, false));
     }
 }
Ejemplo n.º 10
0
 public override void SelfExitState(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Move)
     {
         manuallyInitatedState = false;
         unit.animationManager.ChangeAnimation(RTS.EAnimation.Move, false);
         manuallyInitatedState = false;
         //unit.mover.ClearMovement(); this causes problem of turning to look at previous move point after arrival at basic ally interact
         unit.SetUnitState(new IdleState(unit, false));
     }
 }
Ejemplo n.º 11
0
 public override void AnimationClimaxEvent(RTS.EAnimation state)
 {
     if (state == RTS.EAnimation.Attack)
     {
         if (unit.attacker.attackTargetCollider)
         {
             if (unit.mover.IsInRangeOfPrimaryTarget(unit.attacker.attackTargetCollider.gameObject))
             {
                 unit.attacker.AttackExecution();
                 return;
             }
         }
         //AnimationCompletionEvent(state);
     }
 }
Ejemplo n.º 12
0
 public virtual void AnimationCompletionEvent(RTS.EAnimation state)
 {
 }
Ejemplo n.º 13
0
 public virtual void AnimationClimaxEvent(RTS.EAnimation state)
 {
 }
Ejemplo n.º 14
0
 public override void SelfExitState(RTS.EAnimation state)
 {
     //ExitRoutine();
     unit.SetUnitState(new IdleState(unit, false));
 }
Ejemplo n.º 15
0
 public override void AnimationClimaxEvent(RTS.EAnimation state)
 {
     unit.spawner.SpawnClimaxEvent();
 }
Ejemplo n.º 16
0
 public virtual void AnimationEndPoint(RTS.EAnimation action)
 {
 }
Ejemplo n.º 17
0
 public virtual void AnimationClimaxPoint(RTS.EAnimation action)
 {
 }
Ejemplo n.º 18
0
 public virtual void AnimationStartPoint(RTS.EAnimation action)
 {
 }
Ejemplo n.º 19
0
    public void ChangeAnimation(RTS.EAnimation action, bool toggle)
    {
        if (!animator)
        {
            return;
        }
        switch (action)
        {
        case EAnimation.Idle:
            if (toggle == true)
            {
                animator.SetFloat("MoveSpeed", 0);
                animator.SetBool("Attack", false);
                animator.SetBool("Spawn", false);
                animator.SetBool("Build", false);
                animator.SetBool("Die", false);
                animator.SetBool("Revive", false);
            }
            break;


        case EAnimation.Move:
            if (toggle == true)
            {
                animator.SetFloat("MoveSpeed", paramManager.MoveSpeed);
            }
            else
            {
                animator.SetFloat("MoveSpeed", 0);
            }
            break;

        case EAnimation.Rotate:
            if (toggle == true)
            {
                animator.SetBool("Rotate", true);
            }
            else
            {
                animator.SetBool("Rotate", false);
            }
            break;


        case EAnimation.Attack:
            if (toggle == true)
            {
                float animationScaleFactor = (attackAnimationDuration) / (paramManager.AttackAnimationDuration);
                animator.SetFloat("AttackSpeed", animationScaleFactor);
                animator.SetBool("Attack", true);
            }
            else
            {
                animator.SetBool("Attack", false);
            }
            break;

        case EAnimation.Spawn:
            if (toggle == true)
            {
                float animationScaleFactor = (spawnAnimationDuration) / (paramManager.SpawnAnimationDuration);
                animator.SetFloat("SpawnSpeed", animationScaleFactor);
                animator.SetBool("Spawn", true);
                if (spawnAnimationDuration < 0.01f)
                {
                    SpawnExecutionEvent();
                }
            }
            else
            {
                animator.SetBool("Spawn", false);
            }
            break;

        case EAnimation.SpawnerSpecial:
            if (toggle == true)
            {
                float animationScaleFactor = (specialAttackAnimationDuration) / (paramManager.GetSpawnerSpecialDuration());
                animator.SetFloat("SpecialAttackSpeed", animationScaleFactor);
                animator.SetBool("Special", true);
            }
            else
            {
                animator.SetBool("Special", false);
            }
            break;

        case EAnimation.Build:
            if (toggle == true)
            {
                animator.SetBool("Build", true);
            }
            else
            {
                animator.SetBool("Build", false);
            }
            break;

        case EAnimation.Die:
            if (toggle == true)
            {
                animator.SetBool("Die", true);
            }
            else
            {
                animator.SetBool("Die", false);
            }
            break;

        case EAnimation.Revive:
            if (toggle == true)
            {
                animator.SetBool("Revive", true);
            }
            else
            {
                animator.SetBool("Revive", false);
            }
            break;

        case EAnimation.Sit:
            if (toggle == true)
            {
                animator.SetBool("Sit", true);
            }
            else
            {
                animator.SetBool("Sit", false);
            }
            break;
        }
    }
Ejemplo n.º 20
0
 public override void AnimationCompletionEvent(RTS.EAnimation state)
 {
     unit.spawner.ConcludeSpawnProcess();
     SelfExitState(RTS.EAnimation.Spawn);
 }
Ejemplo n.º 21
0
 public virtual void SelfExitState(RTS.EAnimation state)
 {
     manuallyInitatedState = false;
 }