public void SendToRoomObjectCharacter()
    {
        roomSelect.GetComponent <SelectCharacterManager>().SelectChoosePlayerInRoom(objectCharacterChoose);
        CharacterPreviewController characterPreviewController = GameObject.FindObjectOfType <CharacterPreviewController>().GetComponent <CharacterPreviewController>();

        if (characterPreviewController != null)
        {
            characterPreviewController.SetPrefabSpawnCharacter(objectCharacterChoosePreview);
        }
    }
Пример #2
0
    private void Awake()
    {
        if (characterPreviewController == null)
        {
            characterPreviewController      = GameObject.Instantiate(characterPreviewPrefab).GetComponent <CharacterPreviewController>();
            characterPreviewController.name = "_CharacterPreviewController";
        }

        isOpen = false;
    }
Пример #3
0
    private void Awake()
    {
        toggleAction.OnTriggered += ToggleAction_OnTriggered;
        closeAction.OnTriggered  += CloseAction_OnTriggered;

        if (characterPreviewController == null)
        {
            characterPreviewController      = GameObject.Instantiate(characterPreviewPrefab).GetComponent <CharacterPreviewController>();
            characterPreviewController.name = "_CharacterPreviewController";
        }

        isOpen = false;
    }
Пример #4
0
    private void Awake()
    {
        toggleAction.OnTriggered += ToggleAction_OnTriggered;
        closeAction.OnTriggered  += CloseAction_OnTriggered;
        loadingSpinnerGameObject.SetActive(false);
        doneButton.interactable = false; //the default state of the button should be disable until a profile has been loaded.
        if (characterPreviewController == null)
        {
            characterPreviewController      = GameObject.Instantiate(characterPreviewPrefab).GetComponent <CharacterPreviewController>();
            characterPreviewController.name = "_CharacterPreviewController";
        }

        isOpen = false;
    }
Пример #5
0
    public void CleanUp()
    {
        loadingSpinnerGameObject = null;
        randomizeAnimator        = null;
        if (wearableGridPairs != null)
        {
            int nPairs = wearableGridPairs.Length;
            for (int i = 0; i < nPairs; i++)
            {
                var itemSelector = wearableGridPairs[i].selector;
                if (itemSelector != null)
                {
                    itemSelector.OnItemClicked -= controller.WearableClicked;
                    itemSelector.OnSellClicked -= controller.SellCollectible;
                }
            }
        }

        if (collectiblesItemSelector != null)
        {
            collectiblesItemSelector.OnItemClicked  -= controller.WearableClicked;
            collectiblesItemSelector.OnSellClicked  -= controller.SellCollectible;
            collectiblesItemSelector.OnRetryClicked -= controller.RetryLoadOwnedWearables;
        }

        if (skinColorSelector != null)
        {
            skinColorSelector.OnColorChanged -= controller.SkinColorClicked;
        }
        if (eyeColorSelector != null)
        {
            eyeColorSelector.OnColorChanged -= controller.EyesColorClicked;
        }
        if (hairColorSelector != null)
        {
            hairColorSelector.OnColorChanged -= controller.HairColorClicked;
        }

        if (this != null)
        {
            Destroy(gameObject);
        }

        if (characterPreviewController != null)
        {
            Destroy(characterPreviewController.gameObject);
            characterPreviewController = null;
        }
    }