public static void Postfix(UIStat __instance, string inHeading, ref TextMeshProUGUI ___headingLabel) { if (inHeading.Equals("Braking") || inHeading.Equals("Cornering") || inHeading.Equals("Overtaking")) { ___headingLabel.text += "\n(Race Stat)"; } else if (inHeading.Equals("Consistency")) { ___headingLabel.text += "\n(Form)"; } else if (inHeading.Equals("Smoothness")) { ___headingLabel.text += "\n(Tyre Wear)"; } else if (inHeading.Equals("Adaptability")) { ___headingLabel.text += "\n(Wet Weather)"; } else if (inHeading.Equals("Fitness")) { ___headingLabel.text += "\n(Last 30% of Race)"; } else if (inHeading.Equals("Feedback")) { ___headingLabel.text += "\n(Practice)"; } else if (inHeading.Equals("Focus")) { ___headingLabel.text += "\n(Crash, Spin, Lockup)"; } }
// Use this for initialization void Start() { UICanvas UIcanvas = GameObject.FindGameObjectWithTag("UICanvas").GetComponent <UICanvas>(); Tooltip = UIcanvas.Tooltip; stat = UIcanvas.Stat.GetComponent <UIStat>(); skill = UIcanvas.Skill.GetComponent <UISkill>(); }
public virtual void InitInstance() { SkillObj = new Dictionary <string, List <GameObject> >(); TheSkillClass = SkillClass.instance; SkillParticleManager = GameObject.Find("SkillParticleManager"); TheChampionData = GetComponent <ChampionData>(); TheSplatManager = GetComponentInChildren <SplatManager>(); TheChampionBehaviour = GetComponent <ChampionBehavior>(); TheUIStat = GameObject.FindGameObjectWithTag("UICanvas").GetComponent <UICanvas>().Stat.GetComponent <UIStat>(); InitTempValue(); }
void SetStats(Dictionary <WeaponPart.WeaponStatType, float> _weaponStats) { foreach (KeyValuePair <WeaponPart.WeaponStatType, float> weaponStatEntry in _weaponStats) { foreach (UIWeaponStat UIStat in wpnUIStats) { if (UIStat.stat == weaponStatEntry.Key) { UIStat.SetStatValue(weaponStatEntry.Value); } } } }
public void FindUICanvas() { UICanvas UIcanvas = GameObject.FindGameObjectWithTag("UICanvas").GetComponent <UICanvas>(); UIStat = UIcanvas.stat.GetComponent <UIStat>(); UIIcon = UIcanvas.icon.GetComponent <UIIcon>(); UISkill = UIcanvas.skill.GetComponent <UISkill>(); UIRecall = UIcanvas.recall; UIRightTop = UIcanvas.rightTopUI.GetComponent <UIRightTop>(); isUICanvasFind = true; chatFunction = GameObject.FindGameObjectWithTag("ChatManager").GetComponentInChildren <ChatFunction>(); csTextPool = GameObject.FindGameObjectWithTag("CSText").GetComponent <CsTextPool>(); }
void MakeUIAppear() { if (_wasPlaced) { _wasPlaced = false; return; } _globalVars.uiManager.upgradePanel.SetAndShow( transform, "Trap Name Here", UIStat.Create("Cooldown Duration", CheckAttractionTime), UIStat.Create("Success Chance", SucessRate), UIStat.Create("Area of Effect", AttractRaduis), this ); }
void UpdateUI() { _globalVars.uiManager.upgradePanel.SetStats(UIStat.Create("Cooldown Duration", CheckAttractionTime), UIStat.Create("Success Chance", SucessRate), UIStat.Create("Area of Effect", AttractRaduis)); }
public void FindUICanvas() { TheUIStat = GameObject.FindGameObjectWithTag("UICanvas").GetComponent <UICanvas>().Stat.GetComponent <UIStat>(); }