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
            });
        }
Exemple #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
            });
        }