// Start is called before the first frame update
    void Start()
    {
        string connection = "URI=file:" + Application.persistentDataPath + "/" + "database";

        // Open connection
        dbcon = new SqliteConnection(connection);
        dbcon.Open();

        DustText   = GameObject.FindGameObjectWithTag("DustText");
        sceneStart = GameObject.Find("IncubatorManager").GetComponent <SceneStart>();
        plantStats = new string[7];
        plantID    = Int16.Parse(transform.name);
        for (int i = 0; i < 7; i++)
        {
            plantStats[i] = sceneStart.plants[plantID - 1, i];
        }
        print(plantStats[1] + ", id:" + plantID);

        if (plantStats[1] == "green")
        {
            source = "Plants/Green_1";
        }
        else if (plantStats[1] == "purple")
        {
            source = "Plants/Purple_1";
        }
        else
        {
            source = "Plants/White_1";
        }

        coroutine = HappyCheck(10.0f);
        StartCoroutine(coroutine);
    }
    public static SceneValue Scene;          //현재 씬값

    public SceneManager()
    {
        Scene       = new SceneValue();
        Scene       = SceneValue.Start;
        start       = new SceneStart();
        gameManager = new GameManager();
        end         = new Sceneend();
    }
Exemple #3
0
 /// <summary>
 /// Called the first time a scene is added to a SceneStack.
 /// </summary>
 protected virtual void OnSceneStart()
 {
     SceneStart?.Invoke(this, EventArgs.Empty);
 }
Exemple #4
0
 /// <summary>
 /// Called the first time a scene is added to a SceneStack.
 /// </summary>
 protected virtual void OnSceneStart()
 {
     IsFinished = false;
     SceneStart?.Invoke(this, EventArgs.Empty);
 }