/// <summary> /// Builds the CharacterData represented by this builder's parameters recursively /// and registers it and its components with the appropriate managers. /// </summary> /// <returns>The newly registered CharacterData</returns> public CharacterData BuildAndRegister() { var characterData = this.Build(); CustomCharacterManager.RegisterCustomCharacter(characterData); return(characterData); }
public static void RegisterSubtypes() { CustomCharacterManager.RegisterSubtype("ChronoSubtype_Seer"); CustomCharacterManager.RegisterSubtype("ChronoSubtype_Pythian"); CustomCharacterManager.RegisterSubtype("ChronoSubtype_Eternal"); CustomCharacterManager.RegisterSubtype("ChronoSubtype_Ward"); }
static void Prefix(ref CharacterData __instance, ref GameObject __result) { if (!__instance.HasCharacterPrefabVariant() && CustomCharacterManager.CustomCharacterData.ContainsKey(__instance.GetID())) { CustomCharacterManager.CreateCharacterGameObject(__instance.GetID()); } }
static void Postfix(SaveManager __instance) { CustomCardManager.SaveManager = __instance; CustomCardManager.FinishCustomCardRegistration(); CustomCharacterManager.SaveManager = __instance; CustomCharacterManager.FinishCustomCharacterRegistration(); }
public static void Log(string cardID) { var cardData = CustomCardManager.GetCardDataByID(cardID); if (cardData != null) { UnityEngine.Debug.Log(LocalizationManager.GetTranslation(cardData.GetOverrideDescriptionKey())); return; } var charData = CustomCharacterManager.GetCharacterDataByID(cardID); if (charData != null) { foreach (var trigger in charData.GetTriggers()) { UnityEngine.Debug.Log(LocalizationManager.GetTranslation(trigger.GetDescriptionKey())); } } }
/// <summary> /// Builds the CharacterData represented by this builder's parameters recursively /// and registers it and its components with the appropriate managers. /// </summary> /// <returns>The newly registered CharacterData</returns> public CharacterData BuildAndRegister() { var characterData = this.Build(); CustomCharacterManager.RegisterCustomCharacter(characterData); // Build the unit's synthesis ability if (UnitSynthesisBuilder == null) { // If none was provided, build a dummy synthesis ability if (!characterData.IsChampion()) { BuildDummyUnitSynthesis(characterData); } } else { UnitSynthesisBuilder.Build(); } return(characterData); }
public static void RegisterSubtypes() { CustomCharacterManager.RegisterSubtype("MechSubtype_Mech"); CustomCharacterManager.RegisterSubtype("MechSubtype_Token"); CustomCharacterManager.RegisterSubtype("MechSubtype_Mine"); }
public static void BuildAndRegister() { CustomCharacterManager.RegisterSubtype(Key, "Hybrid"); }
public override void Draw() { if (_CharacterManager != null) { if (_CharacterManager.setup == null) { return; } GUILayout.BeginArea(new Rect((Screen.width / 2) + (Screen.width / 4) - 150, (Screen.height / 2) + (Screen.height / 4) - 150, 300, 300), GuiSkins.Box); GUILayout.Label("Extended Configuration"); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); GUILayout.Label("Set Stat Preset"); foreach (string character in OriginalCharacters) { HeroStat stat = HeroStat.GetInfo(character); if (stat == null || !GUILayout.Button(stat.Name + " Stats")) { continue; } _CharacterManager.SetStatPoint(CreateStat.Speed, stat.Speed); _CharacterManager.SetStatPoint(CreateStat.Gas, stat.Gas); _CharacterManager.SetStatPoint(CreateStat.Blades, stat.Blade); _CharacterManager.SetStatPoint(CreateStat.Acceleration, stat.Accel); } GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Label("Set Hair R/G/B"); // Red hairColorRed = GUILayout.TextField(hairColorRed); if (GUILayout.Button("Set Red Value")) { if (int.TryParse(hairColorRed, out int r)) { if (r < 0) { r = 0; } float rf = r / 255f; _CharacterManager.hairR.GetComponent <UISlider>().sliderValue = rf; _CharacterManager.OnHairRChange(rf); } } // Green GUILayout.Label(string.Empty); hairColorGreen = GUILayout.TextField(hairColorGreen); if (GUILayout.Button("Set Green Value")) { if (int.TryParse(hairColorGreen, out int g)) { if (g < 0) { g = 0; } float gf = g / 255f; _CharacterManager.hairG.GetComponent <UISlider>().sliderValue = gf; _CharacterManager.OnHairGChange(gf); } } // Blue GUILayout.Label(string.Empty); hairColorBlue = GUILayout.TextField(hairColorBlue); if (GUILayout.Button("Set Blue Value")) { if (int.TryParse(hairColorBlue, out int b)) { if (b < 0) { b = 0; } float bf = b / 255f; _CharacterManager.hairB.GetComponent <UISlider>().sliderValue = bf; _CharacterManager.OnHairBChange(bf); } } GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.EndArea(); } else { _CharacterManager = UnityEngine.Object.FindObjectOfType <CustomCharacterManager>(); } }
public static void BuildAndRegister() { CustomCharacterManager.RegisterSubtype(Key, "Beast"); CustomCharacterManager.RegisterSubtype(Key1, "Direling"); CustomCharacterManager.RegisterSubtype(Key2, "Wraith"); }
static void Postfix(SaveManager __instance) { CustomCharacterManager.LoadTemplateCharacter(__instance); CustomAssetManager.InitializeAssetConstructors(); }
public void nextOption() { (custcharacter != null ? custcharacter : custcharacter = this.manager.GetComponent <CustomCharacterManager>()).nextStatOption(this.type); }
public void prevOption() { (custcharacter != null ? custcharacter : custcharacter = this.manager.GetComponent <CustomCharacterManager>()).prevOption(this.part); }