Exemplo n.º 1
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(instance);
     }
     instance = this;
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     if (!isEditor)
     {
         posInstance = relativePosList.instance;
         posInstance.SetValue();
         Destroy(this);
         return;
     }
     relativePosMap = new Dictionary <Vector2, GameObject>();
     cam            = Camera.main;
     if (grid != null)
     {
         size = grid.cellSize.x;
     }
     else
     {
     }
 }