Esempio n. 1
0
 private void ChangeJump(float prevJump, float newJump)
 {
     if (AnimationJump != null)
     {
         AnimationJump.ChangeSpeed(0, prevJump - newJump);
     }
     if (AnimationFall != null)
     {
         AnimationFall.ChangeSpeed(0, newJump - prevJump);
     }
 }
Esempio n. 2
0
        public void Copy(EssentialsObject _object)
        {
            if (_object == null)
            {
                return;
            }

            base.Copy(_object);

            DefaultRunningSpeed = _object.DefaultRunningSpeed;
            DefaultWalkingSpeed = _object.DefaultWalkingSpeed;
            DefaultTurningSpeed = _object.DefaultTurningSpeed;

            IgnoreAnimationRun = _object.IgnoreAnimationRun;
            AnimationRun.Copy(_object.AnimationRun);

            IgnoreAnimationWalk = _object.IgnoreAnimationWalk;
            AnimationWalk.Copy(_object.AnimationWalk);

            IgnoreAnimationIdle = _object.IgnoreAnimationIdle;
            AnimationIdle.Copy(_object.AnimationIdle);

            IgnoreAnimationJump = _object.IgnoreAnimationJump;
            AnimationJump.Copy(_object.AnimationJump);

            IgnoreAnimationFall = _object.IgnoreAnimationFall;
            AnimationFall.Copy(_object.AnimationFall);

            IgnoreAnimationCrawlMove = _object.IgnoreAnimationCrawlMove;
            AnimationCrawlMove.Copy(_object.AnimationCrawlMove);

            IgnoreAnimationCrawlIdle = _object.IgnoreAnimationCrawlIdle;
            AnimationCrawlIdle.Copy(_object.AnimationCrawlIdle);

            IgnoreAnimationCrouchMove = _object.IgnoreAnimationCrouchMove;
            AnimationCrouchMove.Copy(_object.AnimationCrouchMove);

            IgnoreAnimationCrouchIdle = _object.IgnoreAnimationCrouchIdle;
            AnimationCrouchIdle.Copy(_object.AnimationCrouchIdle);

            IgnoreAnimationDead = _object.IgnoreAnimationDead;
            AnimationDead.Copy(AnimationDead);

            IgnoreAnimationAttack = _object.IgnoreAnimationAttack;
            AnimationAttack.Copy(_object.AnimationAttack);

            IgnoreAnimationImpact = _object.IgnoreAnimationImpact;
            AnimationImpact.Copy(_object.AnimationImpact);

            //MotionControl = _object.MotionControl;
            GroundOrientation = _object.GroundOrientation;

            TrophicLevel = _object.TrophicLevel;
            IsCannibal   = _object.IsCannibal;

            UseAutoDetectInteractors = _object.UseAutoDetectInteractors;

            Target.Copy(_object.Target);

            BehaviourFoldout        = _object.BehaviourFoldout;
            BehaviourModeTravel     = _object.BehaviourModeTravel;
            BehaviourModeLeisure    = _object.BehaviourModeLeisure;
            BehaviourModeRendezvous = _object.BehaviourModeRendezvous;

            BehaviourModeRun  = _object.BehaviourModeRun;
            BehaviourModeIdle = _object.BehaviourModeIdle;
            BehaviourModeWalk = _object.BehaviourModeWalk;

            BehaviourModeSpawn          = _object.BehaviourModeSpawn;
            BehaviourModeSpawnEnabled   = _object.BehaviourModeSpawnEnabled;
            BehaviourModeDead           = _object.BehaviourModeDead;
            BehaviourModeDeadEnabled    = _object.BehaviourModeDeadEnabled;
            BehaviourModeWait           = _object.BehaviourModeWait;
            BehaviourModeWaitEnabled    = _object.BehaviourModeWaitEnabled;
            BehaviourModeMounted        = _object.BehaviourModeMounted;
            BehaviourModeMountedEnabled = _object.BehaviourModeMountedEnabled;



            BehaviourModeJump         = _object.BehaviourModeJump;
            BehaviourModeJumpEnabled  = _object.BehaviourModeJumpEnabled;
            BehaviourModeFall         = _object.BehaviourModeFall;
            BehaviourModeFallEnabled  = _object.BehaviourModeFallEnabled;
            BehaviourModeSlide        = _object.BehaviourModeSlide;
            BehaviourModeSlideEnabled = _object.BehaviourModeSlideEnabled;
            BehaviourModeVault        = _object.BehaviourModeVault;
            BehaviourModeVaultEnabled = _object.BehaviourModeVaultEnabled;
            BehaviourModeClimb        = _object.BehaviourModeClimb;
            BehaviourModeClimbEnabled = _object.BehaviourModeClimbEnabled;
        }