// Use this for initialization
    private void Start()
    {
        if (pEnergy == null)
            pEnergy = gameObject.transform.parent.GetComponentInChildren<playerEnergy>();

        if (Bullet == null)
            Bullet = GameObject.Find("Bullet");

        attackTimer = 2.0f;
    }
Esempio n. 2
0
    private void Awake()
    {
        gPoints = GameObject.FindWithTag("Player").GetComponent <growPoints>();
        pHealth = GameObject.FindGameObjectWithTag("Player").GetComponent <playerHealth>();
        pEnergy = GameObject.FindGameObjectWithTag("Player").GetComponent <playerEnergy>();

        Top   = GameObject.Find("Top").GetComponent <BoxCollider>();
        Bot   = GameObject.Find("Bottom").GetComponent <BoxCollider>();
        Left  = GameObject.Find("Left").GetComponent <BoxCollider>();
        Right = GameObject.Find("Right").GetComponent <BoxCollider>();
    }
    private void Awake()
    {
        gPoints = GameObject.FindWithTag("Player").GetComponent<growPoints>();
        pHealth = GameObject.FindGameObjectWithTag("Player").GetComponent<playerHealth>();
        pEnergy = GameObject.FindGameObjectWithTag("Player").GetComponent<playerEnergy>();

        Top = GameObject.Find("Top").GetComponent<BoxCollider>();
        Bot = GameObject.Find("Bottom").GetComponent<BoxCollider>();
        Left = GameObject.Find("Left").GetComponent<BoxCollider>();
        Right = GameObject.Find("Right").GetComponent<BoxCollider>();
    }
Esempio n. 4
0
    // Use this for initialization
    private void Start()
    {
        if (pEnergy == null)
        {
            pEnergy = gameObject.transform.parent.GetComponentInChildren <playerEnergy>();
        }

        if (Bullet == null)
        {
            Bullet = GameObject.Find("Bullet");
        }

        attackTimer = 2.0f;
    }