예제 #1
0
파일: PersonWindow.cs 프로젝트: naaturaz/SM
    private void LoadMenu()
    {
        if (Person1 == null)
        {
            return;
        }

        _title.text = Person1.Name + "";

        if (_aPersonBuildingDetails == null)
        {
            _aPersonBuildingDetails = new ShowAPersonBuildingDetails(Person1, _general, _inv_Ini_Pos_Gen.transform.localPosition);
        }
        else
        {
            //manual update
            _aPersonBuildingDetails.ManualUpdate(Person1);
        }
    }
예제 #2
0
    private void LoadMenu()
    {
        if (_person == null)
        {
            return;
        }

        _title.text = _person.Name + "";
        _info.text  = BuildPersonInfo();

        if (_showAInventory == null)
        {
            _showAInventory = new ShowAInventory(_person.Inventory, _gaveta, _invIniPos.transform.localPosition);
        }
        //diff  person
        else if (_showAInventory != null && _person.IsToReloadInventory())
        {
            _showAInventory.DestroyAll();
            _showAInventory = new ShowAInventory(_person.Inventory, _gaveta, _invIniPos.transform.localPosition);
            _person.InventoryReloaded();
            //if (_aPersonBuildingDetails != null)
            //{
            //    _aPersonBuildingDetails.ManualUpdate(_person, true);
            //}
        }
        _showAInventory.ManualUpdate();
        _inv.text = BuildStringInv(_person);

        if (_aPersonBuildingDetails == null)
        {
            _aPersonBuildingDetails = new ShowAPersonBuildingDetails(_person, _general, _inv_Ini_Pos_Gen.transform.localPosition);
        }
        else
        {
            //manual update
            _aPersonBuildingDetails.ManualUpdate(_person);
        }
    }