Esempio n. 1
0
        public static void First(Entity obj)
        {
            if (GameData.Get("EarthRock/First") != null)
            {
                obj.Destroy();
                return;
            }

            GameData.Set("EarthRock/First", "1");
            GameMethods.ShowMessages(new List <MessageBox>()
            {
                new MessageBox("", "!", obj.Position + new Vector2(0, -64)),
                new MessageBox("Ziggy", "Hi.|.|.", obj.Position + new Vector2(0, -64)),
                new MessageBox("Ziggy", "I didn't think you'd survived.|.|.\nYou fell into that tree almost 3 days ago...", obj.Position + new Vector2(0, -64)),
                new MessageBox("Ziggy", "I'm not sure what this means but I feel implelled\nto tell you that if you want to interact with\nsomething you can press UP!", obj.Position + new Vector2(0, -64)),
                new MessageBox("Ziggy", "Why don't you try it on me!", obj.Position + new Vector2(16, -32))
            }, true, () =>
            {
                // Input icons
                if (GameData.Get("Tips/UpToInteract") == null)
                {
                    GameData.Set("Tips/UpToInteract", "1");
                    Texture2D texture2D = GameMethods.GetInputIcon(InputManager.Input.Up, Global.InputManager.CurrentInputType);
                    GameMethods.DisplayInputIcon(texture2D, new Vector2(119 * 16 + 8, 57 * 16 + 2), () => { return(false); });
                    GameMethods.DisplayInputIcon(texture2D, Entity.Find("EarthRock").Position + new Vector2(-8, 32 + 2), () => { return(tempData.ContainsKey("UpArrow")); });
                }
            }
                                     );
        }
Esempio n. 2
0
        public void MysticCave()
        {
            // Input icons
            Entity pushableBox = Global.Entities.Find(p => p.Name == "MovableObject");

            StaticCoroutines.CoroutineHelper.RunWhen(() => { return(GameGlobal.Player.Position.GetDistance(pushableBox.Position) < Global.Resolution.X / 2); }, () => {
                if (GameData.Get("Tips/Action2ToPush") == null)
                {
                    // Action 2
                    Texture2D texture2D = GameMethods.GetInputIcon(InputManager.Input.Action2, Global.InputManager.CurrentInputType);
                    GameMethods.DisplayInputIcon(texture2D, pushableBox.Position + new Vector2(0, -18), () => { return(GameGlobal.PlayerController.Pushing != 0); }, () => {
                        GameData.Set("Tips/Action2ToPush", "1");
                    });

                    // Right
                    texture2D = GameMethods.GetInputIcon(InputManager.Input.Right, Global.InputManager.CurrentInputType);
                    GameMethods.DisplayInputIcon(texture2D, pushableBox.Position + new Vector2(-18, 0), () => { return(GameGlobal.PlayerController.Pushing != 0); });

                    // Left
                    texture2D = GameMethods.GetInputIcon(InputManager.Input.Left, Global.InputManager.CurrentInputType);
                    GameMethods.DisplayInputIcon(texture2D, pushableBox.Position + new Vector2(18, 0), () => { return(GameGlobal.PlayerController.Pushing != 0); });
                }
            });
        }