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