popup menu refactor, player class refactor
This commit is contained in:
@@ -42,14 +42,14 @@ public class InGameMouseHandler : UnityEngine.Object
|
||||
if (_selectedObject != null)
|
||||
{
|
||||
_waypointVisual.SetWaypoint(_selectedObject._interactionPoint.position);
|
||||
Player.Instance.AddTask(new PlayerTasks(Tasks.Interact, _selectedObject));
|
||||
Player.Instance.Interact(_selectedObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Physics.Raycast(_ray, out RaycastHit hit, 100f, _walkableLayerMask))
|
||||
{
|
||||
_waypointVisual.SetWaypoint(hit.point);
|
||||
Player.Instance.AddTask(new PlayerTasks(Tasks.Move, _waypointVisual));
|
||||
Player.Instance.GoToPoint( _waypointVisual);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user