Esempio n. 1
0
 public override void DidPress(Vector3 dir)
 {
     if (!_lastShotObject)
     {
         base.DidPress(dir);
     }
     else
     {
         JComponent.Remove(_lastShotObject);
     }
 }
Esempio n. 2
0
    public static void Remove(GameObject obj)
    {
        JComponent component = obj.GetComponent <JComponent>();

        if (component)
        {
            component.Remove();
        }
        else
        {
            Destroy(obj);
        }
    }