//construtor public Bubbles(float positionX, float positionY, string color = null) { int variety = NewGame.getVariety(); setColor(variety, color); bubbleObject = MonoBehaviour.Instantiate(Resources.Load(getColor())) as GameObject; Vector2 position = new Vector2(positionX, positionY); bubbleObject.transform.position = position; bubbleObjectController = bubbleObject.GetComponent <BubblesController>(); }
private void Awake() { Instance = this; }