perf: removed obsolete method calls and switched to for in draw calls

This commit is contained in:
2025-05-29 22:49:51 +03:00
parent 59059fa09d
commit 3c38cb4159
7 changed files with 18 additions and 18 deletions

View File

@@ -43,7 +43,7 @@ public class PongManagerBehaviour : Behaviour, INetworkEntity,
public void ScoreToLeft()
{
ScoreLeft++;
OnScored?.InvokeSafe(this);
OnScored?.Invoke(this);
CheckFinish();
}
@@ -51,7 +51,7 @@ public class PongManagerBehaviour : Behaviour, INetworkEntity,
public void ScoreToRight()
{
ScoreRight++;
OnScored?.InvokeSafe(this);
OnScored?.Invoke(this);
CheckFinish();
}
@@ -63,7 +63,7 @@ public class PongManagerBehaviour : Behaviour, INetworkEntity,
ball.ResetBall();
ball.LaunchBall(GetBallLaunchDirection());
OnReset?.InvokeSafe(this);
OnReset?.Invoke(this);
}
private void CheckFinish()
@@ -73,7 +73,7 @@ public class PongManagerBehaviour : Behaviour, INetworkEntity,
if (ScoreLeft > halfwayScore || ScoreRight > halfwayScore)
{
OnFinished?.InvokeSafe(this);
OnFinished?.Invoke(this);
return;
}