void Start() { ProgrammaticSpawning spawning = FindObjectOfType <ProgrammaticSpawning>(); for (int i = 0; i < spawning.Players.Length; i++) { playerScores[spawning.Players[i]] = 0; } puck = GameObject.FindGameObjectWithTag(Tags.puck).GetComponent <LastBumped>(); }
// Use this for initialization void Start() { ProgrammaticSpawning action = GetComponent <ProgrammaticSpawning>(); for (int i = 0; i < action.Players.Length; i++) { Instantiate(addonPrefab).transform.SetParent(action.Players[i], false); } Instantiate(addonPrefab).transform.SetParent(action.Puck, false); Destroy(this); }