Beispiel #1
0
        public override void OnInspectorGUI()
        {
            targ = (GolemBlueprint)target;

            GUILayout.BeginVertical("Medium", "window");
            OnDisplayMedium();
            GUILayout.EndVertical();
            EditorGUILayout.Space();

            GUILayout.BeginVertical("Frame", "window");
            OnDisplayFrame();
            GUILayout.EndVertical();
            EditorGUILayout.Space();

            GUILayout.BeginVertical("Compartments", "window");
            OnDisplayCompartments();
            GUILayout.EndVertical();
            EditorGUILayout.Space();

            GUILayout.BeginVertical("Readout", "window");
            OnDisplayReadout();
            GUILayout.EndVertical();

            if (GUI.changed)
            {
                EditorUtility.SetDirty(targ);
            }
        }
Beispiel #2
0
        public AbilityMap(GolemBlueprint blueprint)
        {
            map = new List <List <List <Ability> > >();

            for (int c = 0; c < blueprint.compartments.Count; c++)
            {
                map.Add(new List <List <Ability> >());
                for (int g = 0; g < blueprint.compartments[c].gears.Count; g++)
                {
                    //TODO: This is an issue that shouldn't happen with in-game builder
                    if (blueprint.compartments[c].gears[g] == null)
                    {
                        continue;
                    }

                    map[c].Add(new List <Ability>());
                    map[c][g].AddRange(blueprint.compartments[c].gears[g].abilities);
                }
            }
        }