public void Attack(bool playSound)
        {
            MyCharacter botEntity = m_bot.AgentEntity;

            if (botEntity == null)
            {
                return;
            }

            IsAttacking       = true;
            m_attackPerformed = false;
            m_attackStart     = MySandboxGame.TotalGamePlayTimeInMilliseconds;

            string attackAnimation = "CyberhoundAttack";
            string attackSound     = "ArcBotCyberhoundAttack";

            if (botEntity.UseNewAnimationSystem)
            {
                // ---
            }
            else
            {
                botEntity.PlayCharacterAnimation(attackAnimation, MyBlendOption.Immediate, MyFrameOption.PlayOnce, 0.0f,
                                                 1, sync: true);
                botEntity.DisableAnimationCommands();
            }
            botEntity.SoundComp.StartSecondarySound(attackSound, true);
        }
예제 #2
0
        public void Attack()
        {
            MyCharacter botEntity = m_bot.AgentEntity;

            if (botEntity == null)
            {
                return;
            }

            IsAttacking       = true;
            m_attackPerformed = false;
            m_attackStart     = MySandboxGame.TotalGamePlayTimeInMilliseconds;

            string attackAnimation, attackSound;

            ChooseAttackAnimationAndSound(out attackAnimation, out attackSound);
            botEntity.PlayCharacterAnimation(attackAnimation, Sandbox.Game.Entities.MyBlendOption.Immediate, Sandbox.Game.Entities.MyFrameOption.PlayOnce, 0.0f, 1, sync: true);
            botEntity.DisableAnimationCommands();
            botEntity.SoundComp.StartSecondarySound(attackSound, true);
        }