예제 #1
0
    // Update is called once per frame
    public void Update()
    {
        if (_lastSelectedCount != WindowCount)
        {
            WindowCountChanged(WindowCount);
            _lastSelectedCount = WindowCount;
        }

        if (_door != Door)
        {
            DoorChanged(Door);
            _door = Door;
        }

        if (_houseMaterial != HouseMaterial)
        {
            HouseMaterialChanged(HouseMaterial);
            _houseMaterial = HouseMaterial;
        }

        if (_doorMaterial != DoorMaterial)
        {
            DoorMaterialChanged(DoorMaterial);
            _doorMaterial = DoorMaterial;
        }

        if (_windowColor != WindowColor)
        {
            WindowColorChanged(WindowColor);
            _windowColor = WindowColor;
        }
    }
예제 #2
0
    // Update is called once per frame
    public void Update()
    {
        if (_lastSelectedCount != WindowCount)
        {
            WindowCountChanged(WindowCount);
            _lastSelectedCount = WindowCount;
        }

        if (_door != Door)
        {
            DoorChanged(Door);
            _door = Door;
        }

        if (_houseMaterial != HouseMaterial)
        {
            HouseMaterialChanged(HouseMaterial);
            _houseMaterial = HouseMaterial;
        }

        if (_doorMaterial != DoorMaterial)
        {
            DoorMaterialChanged(DoorMaterial);
            _doorMaterial = DoorMaterial;
        }

        if (_windowColor != WindowColor)
        {
            WindowColorChanged(WindowColor);
            _windowColor = WindowColor;
        }
    }
예제 #3
0
 public void WindowCountChanged(WindowCount value)
 {
     if (value == WindowCount.Zero)
     {
         SetNumberOfActiveWindows(0);
     }
     else if (value == WindowCount.One)
     {
         SetNumberOfActiveWindows(1);
     }
     else if (value == WindowCount.Two)
     {
         SetNumberOfActiveWindows(2);
     }
     else if (value == WindowCount.Three)
     {
         SetNumberOfActiveWindows(3);
     }
     else if (value == WindowCount.Four)
     {
         SetNumberOfActiveWindows(4);
     }
 }
예제 #4
0
 public void WindowCountChanged(WindowCount value)
 {
     if (value == WindowCount.Zero)
     {
         SetNumberOfActiveWindows(0);
     }
     else if (value == WindowCount.One)
     {
         SetNumberOfActiveWindows(1);
     }
     else if (value == WindowCount.Two)
     {
         SetNumberOfActiveWindows(2);
     }
     else if (value == WindowCount.Three)
     {
         SetNumberOfActiveWindows(3);
     }
     else if (value == WindowCount.Four)
     {
         SetNumberOfActiveWindows(4);
     }
 }
예제 #5
0
    private void AddButtons(string Filter = "")
    {
        wallCount   = 0;
        doorCount   = 0;
        WindowCount = 0;
        furnCount   = 0;
        floorCount  = 0;

        for (int i = 0; i < itemList.Count; i++)
        {
            Item item = itemList[i];
            if (item.icon.name.Contains("Wall") && (Filter.Contains("Wall") || Filter == string.Empty))
            {
                GameObject newButton = buttonObjectPool.GetObject();
                newButton.transform.SetParent(contentPanel);
                newButton.name = "WaBtn" + wallCount.ToString();
                wallCount     += 1;

                ToggleObject sampleButton = newButton.GetComponent <ToggleObject>();
                sampleButton.enabled = disableButtons;
                sampleButton.Setup(item, this);
            }
            if (item.icon.name.Contains("Door") && (Filter.Contains("Door") || Filter == string.Empty))
            {
                GameObject newButton = buttonObjectPool.GetObject();
                newButton.transform.SetParent(contentPanel);
                newButton.name = "DoBtn" + doorCount.ToString();
                doorCount     += 1;

                ToggleObject sampleButton = newButton.GetComponent <ToggleObject>();
                sampleButton.enabled = disableButtons;
                sampleButton.Setup(item, this);
            }
            if (item.icon.name.Contains("Window") && (Filter.Contains("Window") || Filter == string.Empty))
            {
                GameObject newButton = buttonObjectPool.GetObject();
                newButton.transform.SetParent(contentPanel);
                newButton.name = "WiBtn" + WindowCount.ToString();
                WindowCount   += 1;

                ToggleObject sampleButton = newButton.GetComponent <ToggleObject>();
                sampleButton.enabled = disableButtons;
                sampleButton.Setup(item, this);
            }
            if (item.icon.name.Contains("Furniture") && (Filter.Contains("Furniture") || Filter == string.Empty))
            {
                GameObject newButton = buttonObjectPool.GetObject();
                newButton.transform.SetParent(contentPanel);
                newButton.name = "FuBtn" + furnCount.ToString();
                furnCount     += 1;

                ToggleObject sampleButton = newButton.GetComponent <ToggleObject>();
                sampleButton.enabled = disableButtons;
                sampleButton.Setup(item, this);
            }
            if (item.icon.name.Contains("Floor") && (Filter.Contains("Floor") || Filter == string.Empty))
            {
                GameObject newButton = buttonObjectPool.GetObject();
                newButton.transform.SetParent(contentPanel);
                newButton.name = "FlBtn" + floorCount.ToString();
                floorCount    += 1;

                ToggleObject sampleButton = newButton.GetComponent <ToggleObject>();
                sampleButton.enabled = disableButtons;
                sampleButton.Setup(item, this);
            }
        }
    }
예제 #6
0
 // Use this for initialization
 public void Start()
 {
     SetNumberOfActiveWindows(0);
     _lastSelectedCount = WindowCount;
 }
예제 #7
0
 // Use this for initialization
 public void Start()
 {
     SetNumberOfActiveWindows(0);
     _lastSelectedCount = WindowCount;
 }
예제 #8
0
 public _(WindowCount <TSource> parent, IObserver <ISubscribable <TSource> > observer)
     : base(parent, observer)
 {
 }