Ejemplo n.º 1
0
    public GameObject SpawnLaser()
    {
        int      random = Random.Range(0, availableLaser.Count);
        Vector3  dir    = Random.insideUnitCircle;
        UFOLaser laser  = availableLaser[random].GetComponent <UFOLaser>();

        laser.Activate(transform.position, dir);
        availableLaser.RemoveAt(random);

        return(laser.gameObject);
    }