예제 #1
0
 public override bool ActivateAxis(float axis)
 {
     if (AgentComponent.ActiveSkill == null || AgentComponent.ActiveSkill.AllowMovement == true)
     {
         if ((axis > 0 && AgentComponent.SurfaceDetectorComponent.IsOnSurface(Surface.RightWall) == false) ||
             (axis < 0 && AgentComponent.SurfaceDetectorComponent.IsOnSurface(Surface.LeftWall) == false))
         {
             AgentComponent.SetVelocityX(axis * Speed);
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
        public override bool Activate()
        {
            m_multiJump.JumpPower = JumpPower;
            bool result = m_multiJump.Activate();

            if (result == true)
            {
                result = AgentComponent.ActivateAgentSkill(this);
                if (result == true)
                {
                    AgentComponent.SetVelocityX(0f);
                    AgentComponent.AttackerComponent.AttackDamage = AttackDamage;
                    m_isActive = true;

                    // Play the drill audio and animation
                    m_audioSource.clip = RocketDrillAudio;
                    m_audioSource.Play();
                    m_animator.SetInteger("RocketDrill", 1);
                }
            }

            m_multiJump.JumpPower = m_defaultJump;
            return(result);
        }