EffectDemo.cs 427 B

1234567891011121314151617181920
  1. namespace Shapes2D {
  2. using UnityEngine;
  3. using System.Collections;
  4. public class EffectDemo : MonoBehaviour {
  5. public TapEffect tapEffect;
  6. // Update is called once per frame
  7. void Update () {
  8. if (InputUtils.MouseDownOrTap()) {
  9. Vector2 pos = InputUtils.MouseOrTapPosition();
  10. Vector3 worldPos = InputUtils.InputToWorldPosition(pos);
  11. Instantiate(tapEffect, worldPos, Quaternion.identity);
  12. }
  13. }
  14. }
  15. }