コード例 #1
0
ファイル: SwallowActor.cs プロジェクト: Walkman-Mirror/OpenRA
 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
ファイル: SwallowActor.cs プロジェクト: zredb/OpenRA
 public SwallowActor(Actor self, Target target, Armament a, IFacing facing)
 {
     this.target  = target;
     this.facing  = facing;
     armament     = a;
     weapon       = a.Weapon;
     sandworm     = self.Trait <Sandworm>();
     positionable = self.Trait <Mobile>();
     swallow      = self.Trait <AttackSwallow>();
 }
コード例 #3
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;
        }
コード例 #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;
        }