Esempio n. 1
0
        public override bool HandleEvent(BeforeRenderEvent evt)
        {
            //Mod.Log($"PlayerPart.BeforeRenderEvent");

            var frame = XRLCore.CurrentFrame % 60;

            foreach (var follower in followersInZone)
            {
                if (follower == null)
                {
                    Mod.Debug($"Follower is null");
                    continue;
                }

                var cell = follower.CurrentCell;

                if (cell == null)
                {
                    Mod.Debug($"Follower {follower.DebugName} has a null CurrentCell");
                    continue;
                }

                if (cell.ParentZone == null)
                {
                    Mod.Debug($"Follower {follower.DebugName} has a null ParentZone");
                    continue;
                }
                cell.ParentZone.AddLight(cell.X, cell.Y, 1, LightLevel.Omniscient);
                cell.ParentZone.AddLight(cell.X, cell.Y, 5);

                if (follower.pRender == null)
                {
                    Mod.Debug($"Follower {follower.DebugName} has a null pRender");
                    continue;
                }

                if (frame == 0)
                {
                    follower.pRender.SetBackgroundColor("b");
                }
                else if (frame == 10)
                {
                    follower.pRender.ColorString = "";
                }
            }

            return(base.HandleEvent(evt));
        }
Esempio n. 2
0
 public bool HandleEvent(BeforeRenderEvent E)
 {
     Make();
     return(true);
 }
Esempio n. 3
0
 public override bool HandleEvent(BeforeRenderEvent E)
 {
     Make();
     return(base.HandleEvent(E));
 }