예제 #1
0
    //public GameController(){
    //    HighestScore = 0;
    //    BallMaterial = null;
    //    BorderMaterials = null;
    //}

    // Use this for initialization
    void Awake()
    {
        //if (gameObject == null)
        //{
        //    DontDestroyOnLoad(gameObject);
        //}
        //else if(gameObject != this)
        //{
        //    Destroy(gameObject);
        //}
        //File.Delete(Application.persistentDataPath + "/playerInfo.dat");
        //UnityEditor.AssetDatabase.Refresh();

        if (!File.Exists(Application.persistentDataPath + "/playerInfo.dat"))

        {
            HighestScore    = 0;
            BallMaterial    = "Ball";
            BorderMaterials = "White";
            Coins           = 0;
            BallLock        = "111111111111111111111";
            BorderLock      = "111111111111111111111";
            Save();
        }
        else
        {
            Skins.loadSkin();
            Skins.loadSkinBall();
        }
    }