示例#1
0
        public override void Shoot(VehicleShootBehaviour shootBehaviour)
        {
            var randomOffset = new Vector3(Random.Range(-Spread, Spread), Random.Range(0, Spread), 0);
            var point        = GunBarrel.TransformPoint(randomOffset);

            shootBehaviour.CmdFireRound(point, GunBarrel.rotation, ShotStrength);
        }
示例#2
0
        public override void Shoot(VehicleShootBehaviour shootBehaviour)
        {
            for (int i = 0; i < PelletCount; i++)
            {
                var point             = new Vector2(Random.Range(-Spread, Spread), Random.Range(-Spread, Spread));
                var transformed_point = GunBarrel.TransformPoint(point);

                shootBehaviour.CmdFireRound(transformed_point, GunBarrel.rotation, ShotStrength);
                //weaponAnimator.SetTrigger("Fire");
            }
        }