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)); }
public bool HandleEvent(BeforeRenderEvent E) { Make(); return(true); }
public override bool HandleEvent(BeforeRenderEvent E) { Make(); return(base.HandleEvent(E)); }