Exemplo n.º 1
0
        public JournalTrigger(EntityData data, Vector2 offset)
            : base(data, offset)
        {
            levelset = data.Attr("levelset");

            Add(talkComponent = new TalkComponent(
                    new Rectangle(0, 0, data.Width, data.Height),
                    data.Nodes.Length != 0 ? (data.Nodes[0] - data.Position) : new Vector2(data.Width / 2f, data.Height / 2f),
                    player => InGameOverworldHelper.OpenJournal(player, levelset)
                    )
            {
                PlayerMustBeFacing = false
            });
        }
Exemplo n.º 2
0
        public JournalTrigger(EntityData data, Vector2 offset)
            : base(data, offset)
        {
            levelset = data.Attr("levelset");

            Add(talkComponent = new TalkComponent(
                    new Rectangle(0, 0, data.Width, data.Height),
                    data.Nodes.Length != 0 ? (data.Nodes[0] - data.Position) : new Vector2(data.Width / 2f, data.Height / 2f),
                    player => {
                showOnlyDiscovered = data.Bool("showOnlyDiscovered", defaultValue: false);
                vanillaJournal     = data.Bool("vanillaJournal", defaultValue: false);
                InGameOverworldHelper.OpenJournal(player, levelset);
            }
                    )
            {
                PlayerMustBeFacing = false
            });
        }