Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (this.transform.position.x < 10f && buzzState == buzzSt.enter)
     {
         this.enemyRigid.velocity = Vector3.zero;
         buzzState = buzzSt.fire;
         Invoke("shoot", 1.5f);
     }
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        buzzState = buzzSt.enter;

        enemyRigid = this.GetComponent <Rigidbody>();
        this.enemyRigid.velocity = new Vector3(-speed, 0f, 0f);

        base.score = GameObject.Find("Score").GetComponent <Text>();
    }