Exemple #1
0
        private void GameLoop_DayStarted(object sender, DayStartedEventArgs e)
        {
            if (MoongateWax == null)
            {
                MoongateWax = new MoongateNPC("FarmHouse", "MoongateWax");
            }
            MoongateWax.CurrentDialogue.Clear();
            var sp = SpawnPoints[Modworks.RNG.Next(SpawnPoints.Count)];

            sp.GetGameLocation().characters.Add(MoongateWax);
            MoongateWax.setTilePosition(sp.GetTileLocation());
            MoongateWax.startGlowing(Color.FromNonPremultiplied(0, 236, 222, 255), false, 0.01f);

            if (MoongateFlow == null)
            {
                MoongateFlow = new MoongateNPC("FarmHouse", "MoongateFlow");
            }
            MoongateFlow.CurrentDialogue.Clear();
            sp = SpawnPoints[Modworks.RNG.Next(SpawnPoints.Count)];
            sp.GetGameLocation().characters.Add(MoongateFlow);
            MoongateFlow.setTilePosition(sp.GetTileLocation());
            MoongateFlow.startGlowing(Color.FromNonPremultiplied(179, 129, 255, 255), false, 0.01f);

            if (MoongateWane == null)
            {
                MoongateWane = new MoongateNPC("FarmHouse", "MoongateWane");
            }
            MoongateWane.CurrentDialogue.Clear();
            sp = SpawnPoints[Modworks.RNG.Next(SpawnPoints.Count)];
            sp.GetGameLocation().characters.Add(MoongateWane);
            MoongateWane.setTilePosition(sp.GetTileLocation());
            MoongateWane.startGlowing(Color.FromNonPremultiplied(236, 0, 183, 255), false, 0.01f);

            if (MoongateEbb == null)
            {
                MoongateEbb = new MoongateNPC("FarmHouse", "MoongateEbb");
            }
            MoongateEbb.CurrentDialogue.Clear();
            sp = SpawnPoints[Modworks.RNG.Next(SpawnPoints.Count)];
            sp.GetGameLocation().characters.Add(MoongateEbb);
            MoongateEbb.setTilePosition(sp.GetTileLocation());
            MoongateEbb.startGlowing(Color.FromNonPremultiplied(187, 255, 57, 255), false, 0.01f);
        }
        public void DoGateWarp(MoongateNPC mnpc)
        {
            var ymod = bwdyworks.Modworks.Locations.IsTilePathableAndClear(mnpc.currentLocation, new Point((int)mnpc.getTileLocation().X, (int)mnpc.getTileLocation().Y + 1)) ? 1 : -1;

            Game1.player.warpFarmer(new Warp(mnpc.getTileLocationPoint().X, mnpc.getTileLocationPoint().Y + 1, mnpc.currentLocation.Name, mnpc.getTileLocationPoint().X, mnpc.getTileLocationPoint().Y + ymod, false));
        }