private void BuildFirearms(FirearmParams firearmParams) { Firearm.Params = firearmParams; // TODO: Firearm.SlideTransform.localPosition = firearmParams.SlidePosition; Firearm.MagazineTransform.localPosition = firearmParams.MagazinePosition; Firearm.FireTransform.localPosition = firearmParams.FireMuzzlePosition; Firearm.AmmoShooted = 0; if (Firearm.Params.LoadType == FirearmLoadType.Lamp) { Firearm.Fire.SetLamp(firearmParams.GetColorFromMeta("LampReady")); } }
private void BuildFirearms(FirearmParams firearmParams) { if (firearmParams == null) { return; } Firearm.Params = firearmParams; // TODO: Firearm.SlideTransform.localPosition = firearmParams.SlidePosition; Firearm.MagazineTransform.localPosition = firearmParams.MagazinePosition; Firearm.FireTransform.localPosition = firearmParams.FireMuzzlePosition; Firearm.AmmoShooted = 0; Firearm.Fire.SetLamp(Firearm.Params.LoadType == FirearmLoadType.Lamp ? firearmParams.GetColorFromMeta("LampReady") : Color.white); }