Exemplo n.º 1
0
 // Put this script on empty Gameobject in scene
 private void Start()
 {
     string textureLoadPath = "Backgrounds/space_1";
     var c = new SceneDecoratorConfig();
     c.SetTextureLoadPath(textureLoadPath);
     //c.SetNameBackground("BadName");
     //c.SetTagBackground(null);
     c.SetNameBackground("Background");
     //c.SetTagBackground("Background");
     var sd = new SceneDecorator(c);
     sd.Decorate();
 }
Exemplo n.º 2
0
    private void Awake()
    {
        //TODO: Redo
        ISceneDecoratorConfig c = new SceneDecoratorConfig();
        int number = Random.Range(0, 4);
        c.SetTextureLoadPath(backgroundTexturePath + backgroundTextureName + number);
        c.SetNameBackground("Background");
        sceneDecorator = new SceneDecorator(c);
        sceneDecorator.Decorate();//TODO: Redo

        Instance = this;
        PlayerDataManager = GetComponent<RootPlayerDataManager>();
        Adapter = SaveLoadManager.FilledAdapter; // Load and fill adapter from savegame data
        RecalculateAll(Adapter); // recalculating all variables to be up-to-date
        UpdatePlayerStatus(); // Updates player status
    }