daily update on 20241002 by nitload youmu, intrinsic function rebuild, syntax style arrange
This commit is contained in:
@@ -48,40 +48,49 @@ namespace StgSharp.Controls
|
||||
|
||||
private TimeFunction _movement;
|
||||
|
||||
private vec2d _currentPosition, _movementVec;
|
||||
private Vec2 _currentPosition, _movementVec;
|
||||
|
||||
public MarkingLabel(PlainGeometryMesh marker, TimeFunction movement)
|
||||
public MarkingLabel( PlainGeometryMesh marker, TimeFunction movement )
|
||||
{
|
||||
this.marker = marker;
|
||||
_movement = movement;
|
||||
}
|
||||
|
||||
public bool IsEntity => true;
|
||||
public ReadOnlySpan<vec4d> TextureBox
|
||||
|
||||
public ReadOnlySpan<Vec4> TextureBox
|
||||
{
|
||||
get => marker.TextureCoord;
|
||||
}
|
||||
public Rectangle BoundingBox { get; set; }
|
||||
public vec2d Position { get; set; }
|
||||
|
||||
public Rectangle BoundingBox
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Vec2 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public IEnumerator<PlainGeometryMesh> GetEnumerator()
|
||||
{
|
||||
yield return marker;
|
||||
}
|
||||
|
||||
public void Move(vec2d movement)
|
||||
public void Move( Vec2 movement )
|
||||
{
|
||||
if (!_movement.IsComplete)
|
||||
{
|
||||
Position = _currentPosition + (_movement.Calculate() * _movementVec);
|
||||
if( !_movement.IsComplete ) {
|
||||
Position = _currentPosition + ( _movement.Calculate() * _movementVec );
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveTo(vec2d target)
|
||||
public void MoveTo( Vec2 target )
|
||||
{
|
||||
Move(target - Position);
|
||||
Move( target - Position );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user