/** * Called by one of the goal gameobjects */ public void OnGoalHit(Obstacle.ObstacleId playerGoalHit) { Debug.Log($"{playerGoalHit} goal hit!"); if (!_inPlay) { return; } if (playerGoalHit == Obstacle.ObstacleId.Player1) { setScore(_p1Score, _p2Score + 1); } else { setScore(_p1Score + 1, _p2Score); } }
/** * Called by one of the player gameobjects, just here for debugging. */ public void OnPlayerHit(Obstacle.ObstacleId playerThatHit) { Debug.Log($"{playerThatHit} hit the puck!"); }