Exemplo n.º 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);
 }
        public SpriteAnimationSwitcher(String theme, String[] animations)
        {
            game = VersusScreen.Instance;

            foreach (String anim in animations)
            {
                Animations.Add(anim, SpriteAnimation.Load(game.Content, "Textures/" + theme + "/" + anim));
            }
        }
Exemplo n.º 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();
                }
            }
        }
Exemplo n.º 4
0
 public VersusScreen()
 {
     Instance = this;
 }
 public CollidableGameComponent(PlayerIndex PlayerNumber)
     : base(VersusScreen.Instance.Game)
 {
     this.GameHM = VersusScreen.Instance;
     this.PlayerNumber = PlayerNumber;
 }