void Start() { PVData = GameObject.FindGameObjectWithTag("PlayerData").GetComponent <PlayerVehicleData>(); ChassisParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Chassis, playerId); BatteryParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Battery, playerId); FrontMotorParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Motor, playerId); RearMotorParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Motor, playerId); FrontWheelParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Wheel, playerId); RearWheelParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Wheel, playerId); ArmorParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Armor, playerId); FrontWeaponParts = PartsDictionary.GetMyPartsOfType(PartsDictionary.PartType.Weapon, playerId); UpdateUI(); }
void Awake() { PM = GameObject.FindGameObjectWithTag("PartsLibrary").GetComponent <PartsDictionary>(); }