Example #1
0
 public ZLogoActionBase(ZLogoActionBase turtleAction)
 {
     State             = ActionExecState.Wait;
     _startTurleInfo   = turtleAction.GetEndTurleInfo().Clone();
     _endTurleInfo     = turtleAction.GetEndTurleInfo().Clone();
     _runningTurleInfo = turtleAction.GetEndTurleInfo().Clone();
 }
Example #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));
        }
Example #3
0
 public TurtleHome(ZLogoActionBase turtleAction, SpriteInfo startInfo)
     : base(turtleAction)
 {
     _endTurleInfo = startInfo.Clone();
 }
Example #4
0
 public TurtleRotate(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }
Example #5
0
 public TurtleVisibleChange(ZLogoActionBase turtleAction, bool visible)
     : base(turtleAction)
 {
     _endTurleInfo.Visible = visible;
 }
Example #6
0
 public TurtleChange(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }
Example #7
0
 public TurtleMove(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }
Example #8
0
 public TurtlePenChange(ZLogoActionBase turtleAction, Color color)
     : base(turtleAction)
 {
     _endTurleInfo.Pen.Color = color;
 }
Example #9
0
 public TurtleRotateLeft(ZLogoActionBase turtleAction, float degrees)
     : base(turtleAction)
 {
     //_startTurleInfo = turtleAction.GetEndTurleInfo().Clone();
     _endTurleInfo.Angle = _startTurleInfo.Angle + degrees;
 }
Example #10
0
 public TurtlePenChange(ZLogoActionBase turtleAction, bool isDraw)
     : base(turtleAction)
 {
     _endTurleInfo.Pen.IsDraw = isDraw;
 }
Example #11
0
 public TurtlePenChange(ZLogoActionBase turtleAction, TurtlePen pen)
     : base(turtleAction)
 {
     _endTurleInfo.Pen = pen.Clone();
 }
Example #12
0
 public FormChangeColor(ZLogoActionBase turtleAction, TurtleForm tform, Color bgColor)
     : base(turtleAction)
 {
     this.turtleForm = tform;
     this.bgColor    = bgColor;
 }
Example #13
0
 public TurtleJump(ZLogoActionBase turtleAction, float x, float y)
     : base(turtleAction)
 {
     _endTurleInfo.X = x;
     _endTurleInfo.Y = y;
 }
Example #14
0
 public TurtleEnd(ZLogoActionBase turtleAction)
     : base(turtleAction)
 {
 }