Inheritance: OpenRA.Traits.AttackFrontal
コード例 #1
0
ファイル: SwallowActor.cs プロジェクト: CH4Code/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 プロジェクト: Roger-luo/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>();
			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;
		}
コード例 #3
0
ファイル: SwallowActor.cs プロジェクト: ushardul/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>();
            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;
        }