示例#1
0
    public void loadConfig()
    {
        LoadContext loadContext = LoadContext.FromFile("offCenterCamera");

        left               = loadContext.Load <float>("left");
        top                = loadContext.Load <float>("top");
        bottom             = loadContext.Load <float>("bottom");
        transform.position = loadContext.Load <Vector3>("position");
        transform.rotation = loadContext.Load <Quaternion>("rotation");
    }
示例#2
0
    private float LoadHighscore()
    {
        LoadContext context;

        if (Application.isWebPlayer)
        {
            context = LoadContext.FromPlayerPrefs(FileName);
        }
        else
        {
            context = LoadContext.FromFile(FileName);
        }

        return(context.Load <float>("PlayerInfo2"));
        //PointsComponent.HighscoreHolder = context.Load<string>("Holder");
    }
    private void LoadHighscore()
    {
        LoadContext context;

        if (Application.isWebPlayer)
        {
            context = LoadContext.FromPlayerPrefs(FileName);
        }
        else
        {
            context = LoadContext.FromFile(FileName);
        }

        PointsComponent.Points          = 0;
        PointsComponent.Highscore       = context.Load <int>("Highscore");
        PointsComponent.HighscoreHolder = context.Load <string>("Holder");
    }