Reward - removed erroneous comments

This commit is contained in:
MrGadget1024 2023-10-22 06:57:57 -04:00
parent 5cc090a1a5
commit 64f2f109d5
2 changed files with 2 additions and 7 deletions

View File

@ -23,10 +23,8 @@ void OnTriggerEnter(Collider other)
ClaimPrize(other.gameObject);
}
// This is called from PlayerController.CmdClaimPrize which is invoked by PlayerController.OnControllerColliderHit
// This only runs on the server
[ServerCallback]
public void ClaimPrize(GameObject player)
void ClaimPrize(GameObject player)
{
if (available)
{

View File

@ -23,10 +23,8 @@ void OnTriggerEnter(Collider other)
ClaimPrize(other.gameObject);
}
// This is called from PlayerController.CmdClaimPrize which is invoked by PlayerController.OnControllerColliderHit
// This only runs on the server
[ServerCallback]
public void ClaimPrize(GameObject player)
void ClaimPrize(GameObject player)
{
if (available)
{
@ -39,7 +37,6 @@ public void ClaimPrize(GameObject player)
// calculate the points from the color ... lighter scores higher as the average approaches 255
// UnityEngine.Color RGB values are float fractions of 255
uint points = (uint)(((color.r) + (color.g) + (color.b)) / 3);
//Debug.Log($"Scored {points} points R:{color.r} G:{color.g} B:{color.b}");
// award the points via SyncVar on the PlayerController
player.GetComponent<PlayerScore>().score += points;