Пример #1
0
    //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>();
    }
Пример #2
0
 private void Awake()
 {
     Instance = this;
 }