コード例 #1
0
ファイル: Character.cs プロジェクト: X0KA/Game-Design
        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"));
            }
        }
コード例 #2
0
        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);
        }