示例#1
0
 public ZLogoActionBase(ZLogoActionBase turtleAction)
 {
     State             = ActionExecState.Wait;
     _startTurleInfo   = turtleAction.GetEndTurleInfo().Clone();
     _endTurleInfo     = turtleAction.GetEndTurleInfo().Clone();
     _runningTurleInfo = turtleAction.GetEndTurleInfo().Clone();
 }
示例#2
0
        public TurtleMoveBack(ZLogoActionBase turtleAction, float distance)
            : base(turtleAction)
        {
            //_startTurleInfo = turtleAction.GetEndTurleInfo().Clone();
            var     angle      = _startTurleInfo.Angle + 180;
            var     speed      = _startTurleInfo.MoveSpeed;
            Vector2 ToPosition = Vector2Util.GetPointByPolar(_startTurleInfo.X, _startTurleInfo.Y, distance, angle);

            //_endTurleInfo = _startTurleInfo.Clone();
            _endTurleInfo.X = ToPosition.X;
            _endTurleInfo.Y = ToPosition.Y;

            speedX = (float)(speed * MathUtil.Cos(angle));
            speedY = (float)(speed * MathUtil.Sin(angle));
        }
示例#3
0
 public TurtleHome(ZLogoActionBase turtleAction, SpriteInfo startInfo)
     : base(turtleAction)
 {
     _endTurleInfo = startInfo.Clone();
 }
示例#4
0
 public TurtleRotate(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }
示例#5
0
 public TurtleVisibleChange(ZLogoActionBase turtleAction, bool visible)
     : base(turtleAction)
 {
     _endTurleInfo.Visible = visible;
 }
示例#6
0
 public TurtleChange(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }
示例#7
0
 public TurtleMove(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }
示例#8
0
 public TurtlePenChange(ZLogoActionBase turtleAction, Color color)
     : base(turtleAction)
 {
     _endTurleInfo.Pen.Color = color;
 }
示例#9
0
 public TurtleRotateLeft(ZLogoActionBase turtleAction, float degrees)
     : base(turtleAction)
 {
     //_startTurleInfo = turtleAction.GetEndTurleInfo().Clone();
     _endTurleInfo.Angle = _startTurleInfo.Angle + degrees;
 }
示例#10
0
 public TurtlePenChange(ZLogoActionBase turtleAction, bool isDraw)
     : base(turtleAction)
 {
     _endTurleInfo.Pen.IsDraw = isDraw;
 }
示例#11
0
 public TurtlePenChange(ZLogoActionBase turtleAction, TurtlePen pen)
     : base(turtleAction)
 {
     _endTurleInfo.Pen = pen.Clone();
 }
示例#12
0
 public FormChangeColor(ZLogoActionBase turtleAction, TurtleForm tform, Color bgColor)
     : base(turtleAction)
 {
     this.turtleForm = tform;
     this.bgColor    = bgColor;
 }
示例#13
0
 public TurtleJump(ZLogoActionBase turtleAction, float x, float y)
     : base(turtleAction)
 {
     _endTurleInfo.X = x;
     _endTurleInfo.Y = y;
 }
示例#14
0
 public TurtleEnd(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }