示例#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 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;
        }
示例#3
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;
        }
示例#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>();
			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;
		}
示例#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>();
            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;
        }
示例#6
0
 public BaseAttackNotifier(Actor self, BaseAttackNotifierInfo info)
 {
     radarPings     = self.World.WorldActor.TraitOrDefault <RadarPings>();
     this.info      = info;
     lastAttackTime = -info.NotifyInterval * 25;
 }
示例#7
0
 public PlaceBeacon(Actor self, PlaceBeaconInfo info)
 {
     radarPings = self.World.WorldActor.TraitOrDefault <RadarPings>();
     this.info  = info;
 }
示例#8
0
 public PlaceBeacon(Actor self, PlaceBeaconInfo info)
 {
     radarPings = self.World.WorldActor.TraitOrDefault<RadarPings>();
     this.info = info;
 }
示例#9
0
		public WorldCommandWidget(World world, WorldRenderer worldRenderer)
		{
			this.world = world;
			this.worldRenderer = worldRenderer;
			radarPings = world.WorldActor.TraitOrDefault<RadarPings>();
		}
示例#10
0
 public BaseAttackNotifier(Actor self, BaseAttackNotifierInfo info)
 {
     radarPings = self.World.WorldActor.TraitOrDefault<RadarPings>();
     this.info = info;
     lastAttackTime = -info.NotifyInterval * 25;
 }
示例#11
0
 public BeaconGlobal(ScriptContext context)
     : base(context)
 {
     radarPings = context.World.WorldActor.TraitOrDefault<RadarPings>();
 }