mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Reward - removed erroneous comments
This commit is contained in:
parent
5cc090a1a5
commit
64f2f109d5
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user