Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     target = GameObject.FindGameObjectWithTag("Player").transform;
     forref = FindObjectOfType <forallbullets>();
     enemyh = 200;
     refexp = FindObjectOfType <exp>();
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     levelcount          = 0;
     bulexp.amountofloss = 10;
     ply                 = FindObjectOfType <Playermovement>();
     bulforpow           = FindObjectOfType <BulletShooting>();
     bulexp              = FindObjectOfType <forallbullets>();
     bulexp.amountofloss = 10;
 }
Esempio n. 3
0
    void Start()
    {
        bulletlist = new List <GameObject>();
        target     = GameObject.FindGameObjectWithTag("Player").transform;
        forref     = FindObjectOfType <forallbullets>();
        enemyh     = 40000;
        refexp     = FindObjectOfType <exp>();

        //------------pooling------------//
        for (int i = 0; i < 3; i++)
        {
            var newbul = (GameObject)Instantiate(projectile);
            newbul.SetActive(false);
            bulletlist.Add(newbul);
        }
    }