Exemplo n.º 1
0
    private void OnMouseDown()
    {
        Vector3 xy = Camera.main.ScreenToWorldPoint(Input.mousePosition);

        xy.z = 0;
        PopupScript.Create(xy, Random.Range(10, 100) * Random.Range(3, 10), PopupPrefab);
    }
Exemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         var instance = Instantiate(BloodAnimation, transform.position, Quaternion.identity) as GameObject;
         int R        = Random.Range(10, 100) * Random.Range(3, 10);
         TowerAttackScript.WasAHit(R);
         PopupScript.Create(transform.position, R, PopupPrefab);
     }
 }