public void SpawnTail(int count = 1, bool ext = true) { if (ext) { pendingTailCount += count; return; } GameObject tailObj = Instantiate(tailPrefab); tailObj.transform.position = head.GetNewEndTailLocation(tailObj.GetComponent <SnakeTail>()); tailObj.GetComponent <SnakeTail>().speed = speed; SnakeTail tail = tailObj.GetComponent <SnakeTail>(); tail.SetMatchId(networkMatchChecker.matchId); tail.playerIndex = playerIndex; NetworkServer.Spawn(tailObj); ClientSetSpawnedTailToEnd(playerIndex); pendingTailCount -= 1; }