Exemplo n.º 1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 2
0
 void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.GetComponent <Ground>() != null)
     {
         ChipFactory?.Remove(this);
         Destroy(gameObject);
     }
     else if (collision.gameObject.GetComponent <CupEdge>() != null)
     {
         PlayHit();
     }
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     ChipFactory  = ChipFactory.Instance;
     CupFactory   = CupFactory.Instance;
     InputManager = InputManager.Instance;
 }