storage optimized, end screen fixed, multi touch error fixed, error logs on server, fixes...
This commit is contained in:
@@ -418,10 +418,12 @@ public class GameManager : NetworkBehaviour
|
||||
}
|
||||
public static Puck SelectedPuck{
|
||||
get{
|
||||
return instance.selectedPuck;
|
||||
return instance != null ? instance.selectedPuck : null;
|
||||
}
|
||||
|
||||
set{
|
||||
if (instance == null)
|
||||
return;
|
||||
instance.SetSelectedPuck(value);
|
||||
}
|
||||
}
|
||||
@@ -444,6 +446,8 @@ public class GameManager : NetworkBehaviour
|
||||
|
||||
foreach (Puck puck in pucks)
|
||||
{
|
||||
if (puck == null)
|
||||
continue;
|
||||
if(puck.team != SelectedTeam){continue;}
|
||||
float dist = Vector2.Distance(position, puck.transform.position);
|
||||
if (dist < minDistance)
|
||||
@@ -459,6 +463,10 @@ public class GameManager : NetworkBehaviour
|
||||
Coroutine coroutinePostLaunch;
|
||||
public void OnPointerUp(Vector2 direction)
|
||||
{
|
||||
if(selectedPuck == null){
|
||||
return;
|
||||
}
|
||||
|
||||
if(direction.magnitude < puckDragMinClamp){
|
||||
selectedPuck = null;
|
||||
GameEvents.OnSelectedPuckChanged?.Invoke(null);
|
||||
|
||||
Reference in New Issue
Block a user