// Use this for initialization
    void Start()
    {
        scoreKeeper2 = FindObjectOfType <ScoreKeeper2>();
        float distance = transform.position.z - Camera.main.transform.position.z;

        bottomEdge      = Camera.main.ViewportToWorldPoint(new Vector3(0, 0, distance));
        topEdge         = Camera.main.ViewportToWorldPoint(new Vector3(0, 1, distance));
        rightEdge       = Camera.main.ViewportToWorldPoint(new Vector3(1, 0, distance));
        rightEdgeOffset = new Vector3(2.5f, 0, 0);
        startingTime    = 1;
        //spawnVillan();
        SpawnOneByOne();
    }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     scoreKeeper2 = GameObject.Find("Score").GetComponent <ScoreKeeper2>();
     ps           = GetComponent <ParticleSystem>();
 }