コード例 #1
0
 public Drag(Actor self, WPos start, WPos end, int length)
 {
     positionable = self.Trait <IPositionable>();
     movement     = self.TraitOrDefault <IMove>();
     disableable  = movement as IDisabledTrait;
     this.start   = start;
     this.end     = end;
     this.length  = length;
 }
コード例 #2
0
ファイル: Drag.cs プロジェクト: CH4Code/OpenRA
 public Drag(Actor self, WPos start, WPos end, int length)
 {
     positionable = self.Trait<IPositionable>();
     movement = self.TraitOrDefault<IMove>();
     disableable = movement as IDisabledTrait;
     this.start = start;
     this.end = end;
     this.length = length;
 }
コード例 #3
0
 public Drag(Actor self, WPos start, WPos end, int length)
 {
     positionable    = self.Trait <IPositionable>();
     disableable     = self.TraitOrDefault <IMove>() as IDisabledTrait;
     this.start      = start;
     this.end        = end;
     this.length     = length;
     IsInterruptible = false;
 }
        public Turn(Actor self, int desiredFacing, bool setIsMoving = false, bool isInterruptible = true)
        {
            disablable         = self.TraitOrDefault <IMove>() as IDisabledTrait;
            facing             = self.Trait <IFacing>();
            this.desiredFacing = desiredFacing;
            this.setIsMoving   = setIsMoving;
            IsInterruptible    = isInterruptible;

            // This might look confusing, but the current implementation of Mobile is both IMove and IDisabledTrait,
            // and this way we can save a separate Mobile trait look-up.
            mobile = disablable as Mobile;
        }
コード例 #5
0
ファイル: Turn.cs プロジェクト: cjshmyr/OpenRA
 public Turn(Actor self, int desiredFacing)
 {
     disablable         = self.TraitOrDefault <IMove>() as IDisabledTrait;
     this.desiredFacing = desiredFacing;
 }
コード例 #6
0
ファイル: Turn.cs プロジェクト: Flamewh33l/OpenRA
 public Turn(Actor self, int desiredFacing)
 {
     disablable = self.TraitOrDefault<IMove>() as IDisabledTrait;
     this.desiredFacing = desiredFacing;
 }