コード例 #1
0
 public PlayerPanel(Monkey player)
     : base(VersusScreen.Instance.Game)
 {
     this.GameHM = VersusScreen.Instance;
     this.Player = player;
     this.Position = Vector2.Zero;
     VersusScreen.Instance.Components.Add(this);
 }
コード例 #2
0
        public SpriteAnimationSwitcher(String theme, String[] animations)
        {
            game = VersusScreen.Instance;

            foreach (String anim in animations)
            {
                Animations.Add(anim, SpriteAnimation.Load(game.Content, "Textures/" + theme + "/" + anim));
            }
        }
コード例 #3
0
        public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            if (otherScreenHasFocus)
                return;

            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);

            float seconds = (float)gameTime.ElapsedGameTime.TotalSeconds;

            Camera.Update(seconds);
            Camera.Translation.X = (float)(Math.Sin(gameTime.TotalGameTime.TotalSeconds * 0.3) * 50.0);
            Camera.Translation.Y = (float)(Math.Cos(gameTime.TotalGameTime.TotalSeconds * 0.3) * 50.0);

            if (leavingIntro)
            {
                fadingTimer -= seconds;
                if (fadingTimer <= 0.0f) fadingTimer = 0.0f;

                if (!Camera.IsShaking)
                {
                    VersusScreen versus = new VersusScreen();
                    //ScreenManager.AddScreen(versus, null);
                    LoadingScreen.Load(ScreenManager, true, null, versus);
                    versus.OnGameStarted();
                    leavingIntro = false;
                    //ExitScreen();
                }
            }
        }
コード例 #4
0
 public VersusScreen()
 {
     Instance = this;
 }
コード例 #5
0
 public CollidableGameComponent(PlayerIndex PlayerNumber)
     : base(VersusScreen.Instance.Game)
 {
     this.GameHM = VersusScreen.Instance;
     this.PlayerNumber = PlayerNumber;
 }