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; }
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; }
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; }
public Turn(Actor self, int desiredFacing) { disablable = self.TraitOrDefault <IMove>() as IDisabledTrait; this.desiredFacing = desiredFacing; }
public Turn(Actor self, int desiredFacing) { disablable = self.TraitOrDefault<IMove>() as IDisabledTrait; this.desiredFacing = desiredFacing; }