Beispiel #1
0
 private void CustomActivity()
 {
     animationController.Activity();
     RUN();
     Marioisbignowheneedssomebiggershoes();
     Debugthings();
     Jumping();
     MyOwnInput();
 }
 private void CustomActivity()
 {
     animationController.Activity();
     TurtleHiddenDoingThings();
     input.HorinzontalInputa(horin);
     InitializePlatformerInput(input);
 }
Beispiel #3
0
 public void DoPostAiActivity()
 {
     if (CurrentHP > 0)
     {
         RefreshVisualsFromDamageState();
         DoShootingActivity(target);
     }
     spriteAnimationController.Activity();
 }
        void CustomActivity(bool firstTimeCalled)
        {
            animationController.Activity();

            const double timeToPlay = .1f;

            if (ActivityCallCount == 1)
            {
                SpriteInstance.CurrentChainName.ShouldBe("LongAnimation",
                                                         "because the fast animation isn't yet playing, so the controller should " +
                                                         "always fall back on the slow one.");

                fastAnimation.PlayDuration("ShortAnimation", timeToPlay);

                timePlayDurationStarted = PauseAdjustedCurrentTime;
            }
            if (ActivityCallCount == 2)
            {
                SpriteInstance.CurrentChainName.ShouldBe("ShortAnimation",
                                                         "because this layer is now playing");
            }
            if (ActivityCallCount == 3)
            {
                SpriteInstance.CurrentChainName.ShouldBe("ShortAnimation",
                                                         "because this layer should still be playing");
            }

            if (timePlayDurationStarted != null &&
                PauseAdjustedSecondsSince(timePlayDurationStarted.Value) > timeToPlay)
            {
                IsActivityFinished = true;

                SpriteInstance.CurrentChainName.ShouldBe("LongAnimation",
                                                         "becasue the short animation should be done playing by now");

                timePlayLoopStarted = PauseAdjustedCurrentTime;
                fastAnimation.PlayLoop("ShortAnimation", 1);
            }

            if (timePlayLoopStarted != null &&
                PauseAdjustedSecondsSince(timePlayLoopStarted.Value) > AnimationChainListFile["ShortAnimation"].TotalLength)
            {
                SpriteInstance.CurrentChainName.ShouldBe("LongAnimation",
                                                         "because the short animation should have looped by now");
            }
        }
Beispiel #5
0
        private void CustomActivity()
        {
            DoPrimaryActionActivity();
            DoAimingActivity();
            DoShootingActivity();
            DoMovementValueUpdate();
            DoWeaponSwappingLogic();
            spriteAnimationController.Activity();
            UpdateOverlaySprite();
            LightningEndpointSprite.Visible =
                CurrentSecondaryAction == SecondaryActions.Shooting && EquippedWeapon == Weapon.ShootingLightning;
            UpdateLightningSoundEffectStatus();
#if DEBUG
            if (DebuggingVariables.DisplayWeaponLevelInfo)
            {
                string debugString = $@"Current Level: {CurrentWeaponLevelData.CurrentWeaponLevel}
Weapon Modifier: {WeaponDamageModifier}
Weapon Drain: {1 - CurrentWeaponLevelData.CurrentWeaponLevel * WeaponLevelEnergyDrainDecrement}";

                FlatRedBall.Debugging.Debugger.Write(debugString);
            }
#endif
        }
Beispiel #6
0
 private void CustomActivity()
 {
     animationController.Activity();
     Walking();
 }