Пример #1
0
    private void CheckToContinue()
    {
        if (_isCharacterDataLoaded)
        {
            var ponyType = (PF_PlayerData.PlayerClassTypes)Enum.Parse(typeof(PF_PlayerData.PlayerClassTypes), PF_PlayerData.activeCharacter.baseClass.CatalogCode);

            switch ((int)ponyType)
            {
            case 0:
                foreach (var item in colorize)
                {
                    item.color = PF_GamePlay.ClassColor1;
                }
                break;

            case 1:
                foreach (var item in colorize)
                {
                    item.color = PF_GamePlay.ClassColor2;
                }
                break;

            case 2:
                foreach (var item in colorize)
                {
                    item.color = PF_GamePlay.ClassColor3;
                }
                break;

            default:
                Debug.LogWarning("Unknown Class type detected...");
                break;
            }

            PF_PlayerData.UpdateActiveCharacterData();
            foreach (var each in UiObjects)
            {
                each.gameObject.SetActive(true); //<---- BOOM Null Ref
                each.BroadcastMessage("Init", SendMessageOptions.DontRequireReceiver);
            }
            // ResetDataChecks
            _isCharacterDataLoaded = false;
        }
    }