summaryrefslogtreecommitdiff
path: root/GameCode/SetTeamColorFromParentPlayer.cs
blob: 26e66150d611e07244b779699a04da44932709a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using UnityEngine;

public class SetTeamColorFromParentPlayer : MonoBehaviour
{
	private void Start()
	{
		Player player = GetComponentInParent<Player>();
		if (!player)
		{
			player = GetComponentInParent<SpawnedAttack>().spawner;
		}
		GetComponent<SetTeamColor>().Set(PlayerSkinBank.GetPlayerSkinColors(player.playerID));
	}
}