public override void SetTheme(MoodTheme theme)
 {
     if (tableRenderer != null)
     {
         tableRenderer.sharedMaterial = theme.WallMaterial;
     }
 }
Example #2
0
 public override void SetTheme(MoodTheme theme)
 {
     foreach (MeshRenderer renderer in allDoorRenderers)
     {
         renderer.sharedMaterial = theme.WallMaterial;
     }
 }
Example #3
0
    public void SnapToTheme(MoodTheme theme)
    {
        sunlight.color          = theme.LightColor;
        sunlight.intensity      = theme.LightIntensity;
        RenderSettings.fogColor = theme.FogColor;
        RenderSettings.skybox.SetFloat("_Exposure", theme.SkyboxExposure);

        DynamicGI.UpdateEnvironment();
        animateTheme = false;
    }
    // Use this for initialization
    void Start()
    {
        if (allDollhouses.Length > 0)
        {
            // Setup the first dollhouse
            int       index    = 0;
            MoodTheme newTheme = mood.RandomTheme;
            DollHouse.UpdateTheme(allDollhouses[index].Dollhouse, mood, newTheme);
            allDollhouses[index].Table.sharedMaterial = newTheme.WallMaterial;
            mood.SnapToTheme(newTheme);

            // Setup the rest
            ++index;
            for (; index < allDollhouses.Length; ++index)
            {
                newTheme = mood.RandomTheme;
                DollHouse.UpdateTheme(allDollhouses[index].Dollhouse, mood, newTheme);
                allDollhouses[index].Table.sharedMaterial = newTheme.WallMaterial;
            }
        }
    }
    public static void UpdateTheme(Renderer model, MoodSetter setter, MoodTheme theme)
    {
        // Update all the material textures!
        if (model.sharedMaterials.Length > 0)
        {
            Material[] newTheme = new Material[model.sharedMaterials.Length];

            // First set the floor material
            int index = newTheme.Length - 1;
            newTheme[index] = setter.RandomFloorMaterial;

            // Next, set the wall material
            --index;
            for (; index >= 0; --index)
            {
                newTheme[index] = theme.WallMaterial;
            }

            // Update material
            model.sharedMaterials = newTheme;
        }
    }
    void Start()
    {
        // Adjust to theme
        assignedTheme = MoodSetter.Instance.RandomTheme;
        foreach (TierObject tier in AllObjects)
        {
            tier.SetTheme(assignedTheme);
        }

        // Need to add this tier into all the lists
        ResizeParent.Instance.AllTiers.Add(this);

        // Add this tier to the stack if this is the first tier
        if (startingTier == 0)
        {
            ResizeParent.Instance.TierHistory.Add(this);
            ApplyTheme();
        }

        // Bind to event
        ResizeParent.Instance.OnBeforeResize += Instance_OnBeforeResize;
        ResizeParent.Instance.OnAfterResize  += ExtraSetup;
    }
 public override void SetTheme(MoodTheme theme)
 {
     UpdateTheme(houseRenderer, MoodSetter.Instance, theme);
 }
 public abstract void SetTheme(MoodTheme theme);
 public override void SetTheme(MoodTheme theme)
 {
     // Do nothing.
 }
 public override void SetTheme(MoodTheme theme)
 {
     // FIXME: update all the material textures!
     //throw new System.NotImplementedException();
 }