minor cursor changes
This commit is contained in:
parent
c3c13089c1
commit
cea7c99c3d
@ -36,7 +36,10 @@ public partial class player : Camera3D
|
||||
private float PR { get => (float)_pr.Value; set => _pr.Value = value; }
|
||||
private float Kash { get => (float)_kash.Value; set => _kash.Value = value; }
|
||||
|
||||
private string Chatter { get => _chatter.Get("text").ToString(); set {
|
||||
private string Chatter
|
||||
{
|
||||
get => _chatter.Get("text").ToString(); set
|
||||
{
|
||||
if (!(bool)_tmrChtr.Get("is_stopped") && value != "")
|
||||
_sndChtr.Play();
|
||||
_chatter.Set("text", value);
|
||||
@ -103,7 +106,7 @@ public partial class player : Camera3D
|
||||
//Get the collision with map and change its X and Z value to always be in the center of a tile
|
||||
Vector3I collisionVector = (Vector3I)_cursor.GetCollisionPoint();
|
||||
_cursorPosLabel.Text = "Virtual Cursor Postion" + collisionVector.ToString();
|
||||
_cursorPoint.GlobalPosition = new Vector3(collisionVector.X - collisionVector.X % 2, collisionVector.Y + 0.1f, collisionVector.Z - collisionVector.Z % 2);
|
||||
_cursorPoint.GlobalPosition = new Vector3(collisionVector.X - collisionVector.X % 2, 1.1f, collisionVector.Z - collisionVector.Z % 2);
|
||||
|
||||
if (game_manager.CurrentState == game_manager.State.Building)
|
||||
HandleBuilding();
|
||||
@ -130,8 +133,8 @@ public partial class player : Camera3D
|
||||
_mousePosLabel.Text = "Mouse position: " + vec.ToString();
|
||||
|
||||
_cursor.Position = new Vector3(
|
||||
(vec.X - GetViewport().GetVisibleRect().Size.X / 2) * this.Position.Y / 700,
|
||||
-((vec.Y - GetViewport().GetVisibleRect().Size.Y / 2) * this.Position.Y / 700)
|
||||
(vec.X - GetViewport().GetVisibleRect().Size.X / 2) * this.Position.Y / 1000,
|
||||
-((vec.Y - GetViewport().GetVisibleRect().Size.Y / 2) * this.Position.Y / 1000)
|
||||
, 0
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user