Beispiel #1
0
        private void Start()
        {
            prefabInstance = Instantiate(trapUIPrefab, transform);
            prefabInstance.SetActive(false);

            playerTraps = GameObject.FindGameObjectWithTag("Player").GetComponent <GnomeTrapControl>();
        }
Beispiel #2
0
        private void Start()
        {
            _text = GetComponent <Text>();

            switch (element)
            {
            case Ellys.CableTrapAmount:

                traps = GameObject.FindGameObjectWithTag("Player").GetComponent <GnomeTrapControl>();

                break;

            case Ellys.BBQTrapAmount:

                traps = GameObject.FindGameObjectWithTag("Player").GetComponent <GnomeTrapControl>();

                break;

            case Ellys.Fireworks:

                firework = GameObject.FindGameObjectWithTag("Player").GetComponent <FireworkMove>();

                break;

            default:
                break;
            }
        }