Пример #1
0
 private void Awake()
 {
     animationController = GetComponent <AnimationController>();
     messageQueue        = GetComponent <MessageQueue>();
     avatarStats         = GetComponent <AvatarStats>();
     brainController     = GetComponent <BrainController>();
     zombify             = GetComponent <Zombify>();
 }
Пример #2
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();
            AvatarStats avatarStats = (AvatarStats)target;

            if (avatarStats.stats != null)
            {
                showAvatarStatsData = EditorGUILayout.Foldout(showAvatarStatsData, foldoutText);
                if (showAvatarStatsData)
                {
                    EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
                    Editor statsEditor = Editor.CreateEditor(avatarStats.stats);
                    statsEditor.DrawDefaultInspector();
                    foldoutText = "Hide AvatarStats object data.";
                }
                else
                {
                    foldoutText = "Show AvatarStats object data.";
                }
            }
        }