示例#1
0
    /**
     * 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);
        }
    }
示例#2
0
 /**
  * Called by one of the player gameobjects, just here for debugging.
  */
 public void OnPlayerHit(Obstacle.ObstacleId playerThatHit)
 {
     Debug.Log($"{playerThatHit} hit the puck!");
 }