Beispiel #1
0
    public void View(WorldEntityNetwork worldEntityNet, bool isEditable)
    {
        characterInfoUI.gameObject.SetActive(false);
        weaponInfoUI.gameObject.SetActive(false);
        itemInfoUI.gameObject.SetActive(false);
        armorInfoUI.gameObject.SetActive(false);

        switch (worldEntityNet.worldEntity.type)
        {
        case WorldEntityType.Character:
            characterInfoUI.gameObject.SetActive(true);
            characterInfoUI.isEditable = isEditable;
            characterInfoUI.View(worldEntityNet);
            break;

        case WorldEntityType.Container:
            itemInfoUI.gameObject.SetActive(true);
            itemInfoUI.isEditable = isEditable;
            itemInfoUI.View(worldEntityNet);
            break;

        case WorldEntityType.Weapon:
            weaponInfoUI.gameObject.SetActive(true);
            weaponInfoUI.isEditable = isEditable;
            weaponInfoUI.View(worldEntityNet);
            break;

        case WorldEntityType.Armour:
            armorInfoUI.gameObject.SetActive(true);
            armorInfoUI.isEditable = isEditable;
            armorInfoUI.View(worldEntityNet);
            break;

        default:
            break;
        }
    }