Esempio n. 1
0
        public override void Added(Scene scene)
        {
            base.Added(scene);
            level          = SceneAs <Level>();
            level.CanRetry = false;

            otherChoices = scene.Entities.FindAll <PlayerSelectTrigger>();
            otherChoices.Sort();
            for (int i = 0; i < otherChoices.Count; i++)
            {
                if (otherChoices[i] == this)
                {
                    PlayerToken token = new PlayerToken(i, BoardController.TokenPaths[i], ScreenCoordsFromGameCoords(Position, new Vector2(Width, Height) * 3), new Vector2(.25f, .25f), -900000000, new BoardController.BoardSpace());
                    level.Add(token);
                    playerID = i;
                }
            }
            otherChoices.Remove(this);
        }
Esempio n. 2
0
        public override void Render()
        {
            base.Render();
            if (DrawLerp > 0f)
            {
                float num = -300f * Ease.CubeIn(1f - DrawLerp);

                int index = 0;
                for (int i = 0; i < GameData.Instance.players.Length; i++)
                {
                    if (GameData.Instance.players[i] != null)
                    {
                        bg.Draw(new Vector2(num, Y + 44 * (index + 1)));
                        PlayerToken token = GameData.Instance.players[i].token;
                        token.textures[(int)token.frame].DrawCentered(new Vector2(num + 60, Y - 8 + 44 * (index + 1.5f)), Color.White, .3f);

                        PixelFont font         = Dialog.Languages["english"].Font;
                        float     fontFaceSize = Dialog.Languages["english"].FontFaceSize;
                        font.DrawOutline(fontFaceSize, string.Format("{0:F1} M", (GameData.Instance.minigameResults.FirstOrDefault((t) => t.Item1 == i)?.Item2 ?? GameData.Instance.minigameStatus[i]) / 50.0), new Vector2(num + 200, Y + 44f * (index + 2)), new Vector2(0.5f, 1f), Vector2.One * (1f + wiggler.Value * 0.15f), Color.White, 2f, Color.Black);
                        index++;
                    }
                }
            }
        }
Esempio n. 3
0
        public override void Render()
        {
            base.Render();
            if (DrawLerp > 0f)
            {
                float num = -300f * Ease.CubeIn(1f - DrawLerp);

                int index = 0;
                for (int i = 0; i < GameData.Instance.players.Length; i++)
                {
                    if (GameData.Instance.players[i] != null)
                    {
                        scoreBg.Draw(new Vector2(num, Y + 44 * (index + 1)));
                        GFX.Gui[PlayerToken.GetFullPath(BoardController.TokenPaths[i]) + "00"].DrawCentered(new Vector2(num + 40, Y - 8 + 44 * (index + 1.5f)), Color.White, .3f);

                        PixelFont font         = Dialog.Languages["english"].Font;
                        float     fontFaceSize = Dialog.Languages["english"].FontFaceSize;
                        string    text         = (GameData.Instance.minigameStatus.ContainsKey(i) ? GameData.Instance.minigameStatus[i].ToString() : "0") + (max > 0 ? "/" + max : "");
                        font.DrawOutline(fontFaceSize, text, new Vector2(num + 120, Y + 44f * (index + 2)), new Vector2(0.5f, 1f), Vector2.One * (1f + wiggler.Value * 0.15f), Color.White, 2f, Color.Black);
                        index++;
                    }
                }
            }
        }