Пример #1
0
 public SwallowActor(Actor self, Target target, WeaponInfo weapon)
 {
     this.target  = target;
     this.weapon  = weapon;
     sandworm     = self.Trait <Sandworm>();
     positionable = self.Trait <Mobile>();
     swallow      = self.Trait <AttackSwallow>();
     manager      = self.Trait <UpgradeManager>();
     radarPings   = self.World.WorldActor.TraitOrDefault <RadarPings>();
 }
Пример #2
0
        public MapNotificationEffect(Player player, string category, string notification, int delay,
                                     bool pingVisible, WPos pos, Color pingColor, int pingDuration = 50)
        {
            this.player       = player;
            remainingDelay    = delay;
            this.category     = category;
            this.notification = notification;
            this.pos          = pos;
            duration          = pingDuration;
            visible           = pingVisible;
            color             = pingColor;

            radarPings = player.World.WorldActor.TraitOrDefault <RadarPings>();
        }
Пример #3
0
        public RadarWidget(World world, WorldRenderer worldRenderer)
        {
            this.world         = world;
            this.worldRenderer = worldRenderer;
            radarPings         = world.WorldActor.TraitOrDefault <RadarPings>();

            isRectangularIsometric = world.Map.Grid.Type == MapGridType.RectangularIsometric;
            cellWidth     = isRectangularIsometric ? 2 : 1;
            previewWidth  = world.Map.MapSize.X;
            previewHeight = world.Map.MapSize.Y;
            if (isRectangularIsometric)
            {
                previewWidth = 2 * previewWidth - 1;
            }
        }
Пример #4
0
        public SwallowActor(Actor self, Target target, WeaponInfo weapon)
        {
            this.target  = target;
            this.weapon  = weapon;
            sandworm     = self.Trait <Sandworm>();
            positionable = self.Trait <Mobile>();
            swallow      = self.Trait <AttackSwallow>();
            renderUnit   = self.Trait <RenderUnit>();
            radarPings   = self.World.WorldActor.TraitOrDefault <RadarPings>();
            countdown    = swallow.Info.AttackTime;

            renderUnit.DefaultAnimation.ReplaceAnim("burrowed");
            stance   = AttackState.Burrowed;
            location = target.Actor.Location;
        }
Пример #5
0
        public SwallowActor(Actor self, Target target, WeaponInfo weapon)
        {
            this.target    = target;
            this.weapon    = weapon;
            sandworm       = self.Trait <Sandworm>();
            positionable   = self.Trait <Mobile>();
            swallow        = self.Trait <AttackSwallow>();
            withSpriteBody = self.Trait <WithSpriteBody>();
            radarPings     = self.World.WorldActor.TraitOrDefault <RadarPings>();
            countdown      = swallow.Info.AttackTime;

            withSpriteBody.DefaultAnimation.ReplaceAnim(sandworm.Info.BurrowedSequence);
            stance   = AttackState.Burrowed;
            location = target.Actor.Location;
        }
Пример #6
0
        public RadarWidget(World world, WorldRenderer worldRenderer)
        {
            this.world         = world;
            this.worldRenderer = worldRenderer;
            radarPings         = world.WorldActor.TraitOrDefault <RadarPings>();

            isDiamond     = world.Map.TileShape == TileShape.Diamond;
            cellWidth     = isDiamond ? 2 : 1;
            previewWidth  = world.Map.MapSize.X;
            previewHeight = world.Map.MapSize.Y;
            if (isDiamond)
            {
                previewWidth = 2 * previewWidth - 1;
            }
        }
Пример #7
0
        public RadarWidget(World world, WorldRenderer worldRenderer)
        {
            this.world         = world;
            this.worldRenderer = worldRenderer;

            radarPings = world.WorldActor.TraitOrDefault <RadarPings>();
            MarkShroudDirty(world.Map.AllCells.MapCoords.Select(uv => (PPos)uv));

            isRectangularIsometric = world.Map.Grid.Type == MapGridType.RectangularIsometric;
            cellWidth     = isRectangularIsometric ? 2 : 1;
            previewWidth  = world.Map.MapSize.X;
            previewHeight = world.Map.MapSize.Y;
            if (isRectangularIsometric)
            {
                previewWidth = 2 * previewWidth - 1;
            }
        }
Пример #8
0
        public IngameUiWidget(World world, WorldRenderer worldRenderer)
        {
            this.World         = world;
            this.WorldRenderer = worldRenderer;
            this.RadarPings    = world.WorldActor.TraitOrDefault <RadarPings>();

            this.IgnoreChildMouseOver = true;
            this.IgnoreMouseOver      = true;

            this.Palette = this.WorldRenderer.Palette($"player{this.World.LocalPlayer.InternalName}");

            this.AddChild(new StatusWidget(this));
            this.AddChild(this.Radar = new(this));
            this.AddChild(new SidebarWidget(this));
            this.AddChild(this.Tooltip = new());

            this.Resize();
            this.TickOuter();
        }
Пример #9
0
        public IngameUiWidget(World world, WorldRenderer worldRenderer)
        {
            World         = world;
            WorldRenderer = worldRenderer;
            RadarPings    = world.WorldActor.Trait <RadarPings>();

            IgnoreChildMouseOver = true;
            IgnoreMouseOver      = true;

            Palette = WorldRenderer.Palette(World.LocalPlayer.Faction.InternalName + "_Buttons" + World.LocalPlayer.InternalName);

            AddChild(Status = new StatusWidget(this));
            AddChild(Radar  = new RadarWidget(this));
            AddChild(new SidebarWidget(this));
            AddChild(Tooltip = new TooltipWidget());

            Resize();
            TickOuter();
        }
 public JumpToLastEventHotkeyLogic(Widget widget, ModData modData, WorldRenderer worldRenderer, World world, Dictionary <string, MiniYaml> logicArgs)
     : base(widget, modData, "JumpToLastEventKey", "WORLD_KEYHANDLER", logicArgs)
 {
     viewport   = worldRenderer.Viewport;
     radarPings = world.WorldActor.TraitOrDefault <RadarPings>();
 }
Пример #11
0
 public AdvancedAttackNotifier(Actor self, AdvancedAttackNotifierInfo info)
 {
     radarPings = self.World.WorldActor.Trait <RadarPings>();
     this.info  = info;
 }
Пример #12
0
		public RadarWidget(World world, WorldRenderer worldRenderer)
		{
			this.world = world;
			this.worldRenderer = worldRenderer;
			radarPings = world.WorldActor.TraitOrDefault<RadarPings>();
		}
Пример #13
0
 public BaseAttackNotifier(Actor self, BaseAttackNotifierInfo info)
 {
     radarPings = self.World.WorldActor.TraitOrDefault<RadarPings>();
     this.info = info;
     lastAttackTime = -info.NotifyInterval * 25;
 }
Пример #14
0
 public AcolyteAttackNotifier(Actor self, AcolyteAttackNotifierInfo info)
 {
     radarPings     = self.World.WorldActor.TraitOrDefault <RadarPings>();
     this.info      = info;
     lastAttackTime = -info.NotifyInterval * 25;
 }
Пример #15
0
 public BeaconGlobal(ScriptContext context) : base(context)
 {
     radarPings = context.World.WorldActor.TraitOrDefault <RadarPings>();
 }
Пример #16
0
 public RadarWidget(World world, WorldRenderer worldRenderer)
 {
     this.world         = world;
     this.worldRenderer = worldRenderer;
     radarPings         = world.WorldActor.TraitOrDefault <RadarPings>();
 }
Пример #17
0
 public PlaceSimpleBeacon(Actor self, PlaceSimpleBeaconInfo info)
 {
     radarPings = self.World.WorldActor.TraitOrDefault <RadarPings>();
     this.info  = info;
 }