Пример #1
0
    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>();
    }
Пример #2
0
    // 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);
    }