public GpsDot(Actor self, GpsDotInfo info) { this.self = self; this.info = info; anim = new Animation("gpsdot"); anim.PlayRepeating(info.String); self.World.AddFrameEndTask(w => w.Add(this)); if (self.World.LocalPlayer != null) watcher = self.World.LocalPlayer.PlayerActor.Trait<GpsWatcher>(); }
public GpsDot(Actor self, GpsDotInfo info) { this.self = self; this.info = info; anim = new Animation("gpsdot"); anim.PlayRepeating(info.String); self.World.AddFrameEndTask(w => w.Add(this)); if (self.World.LocalPlayer != null) { watcher = self.World.LocalPlayer.PlayerActor.Trait <GpsWatcher>(); } }
public GpsDot(Actor self, GpsDotInfo info) { this.self = self; this.info = info; anim = new Animation("gpsdot"); anim.PlayRepeating(info.String); self.World.AddFrameEndTask(w => w.Add(this)); huf = Lazy.New(() => self.TraitOrDefault<HiddenUnderFog>()); fuf = Lazy.New(() => self.TraitOrDefault<FrozenUnderFog>()); spy = Lazy.New(() => self.TraitOrDefault<Spy>()); cloak = Lazy.New(() => self.TraitOrDefault<Cloak>()); watcher = new Cache<Player, GpsWatcher>(p => p.PlayerActor.Trait<GpsWatcher>()); frozen = new Cache<Player, FrozenActorLayer>(p => p.PlayerActor.Trait<FrozenActorLayer>()); }
public GpsDot(Actor self, GpsDotInfo info) { this.self = self; this.info = info; anim = new Animation("gpsdot"); anim.PlayRepeating(info.String); self.World.AddFrameEndTask(w => w.Add(this)); huf = Lazy.New(() => self.TraitOrDefault <HiddenUnderFog>()); fuf = Lazy.New(() => self.TraitOrDefault <FrozenUnderFog>()); spy = Lazy.New(() => self.TraitOrDefault <Spy>()); cloak = Lazy.New(() => self.TraitOrDefault <Cloak>()); watcher = new Cache <Player, GpsWatcher>(p => p.PlayerActor.Trait <GpsWatcher>()); frozen = new Cache <Player, FrozenActorLayer>(p => p.PlayerActor.Trait <FrozenActorLayer>()); }
public GpsDot(Actor self, GpsDotInfo info) { this.self = self; this.info = info; anim = new Animation(self.World, info.Image); anim.PlayRepeating(info.String); self.World.AddFrameEndTask(w => w.Add(this)); huf = Exts.Lazy(() => self.TraitOrDefault <HiddenUnderFog>()); fuf = Exts.Lazy(() => self.TraitOrDefault <FrozenUnderFog>()); disguise = Exts.Lazy(() => self.TraitOrDefault <Disguise>()); cloak = Exts.Lazy(() => self.TraitOrDefault <Cloak>()); frozen = new Cache <Player, FrozenActorLayer>(p => p.PlayerActor.Trait <FrozenActorLayer>()); dotStates = new PlayerDictionary <DotState>(self.World, player => new DotState(player.PlayerActor.Trait <GpsWatcher>())); }
public GpsDot(Actor self, GpsDotInfo info) { this.self = self; this.info = info; anim = new Animation(self.World, info.Image); anim.PlayRepeating(info.String); self.World.AddFrameEndTask(w => w.Add(this)); huf = Exts.Lazy(() => self.TraitOrDefault<HiddenUnderFog>()); fuf = Exts.Lazy(() => self.TraitOrDefault<FrozenUnderFog>()); disguise = Exts.Lazy(() => self.TraitOrDefault<Disguise>()); cloak = Exts.Lazy(() => self.TraitOrDefault<Cloak>()); frozen = new Cache<Player, FrozenActorLayer>(p => p.PlayerActor.Trait<FrozenActorLayer>()); dotStates = new PlayerDictionary<DotState>(self.World, player => new DotState(player.PlayerActor.Trait<GpsWatcher>())); }