public void Shoot() { BulletShot = GunModel.TryShoot(); if (BulletShot) { ShootBullet(); } }
public void Start() { gunModel = new GunModel( new BottomlessClip(), new AccurateAim(AccurateShotRange), new GunPositioning(center, hand, gun, pivot, barrel), 0.0f, stats ); rotateBullet = true; }
private void Start() { events = GameManager.Instance.Events; gunModel = new GunModel( new BasicClip(baseGunStats.ClipSize), new AccurateAim(accurateShootingRange), new GunPositioning(center, hand, gun, pivot, barrel), baseGunStats.ReloadRate, GunStats ); GunModel.OnReloadBegin += OnReloadBegin; GunModel.OnChangeInBulletsLeftInClip += OnChangeInBulletsLeftInClip; GunModel.OnChangeInClipSize += OnChangeInClipSize; // Triggers updates in the HUD GunModel.ChangeClipSize(baseGunStats.ClipSize); }
private void Update() { GunModel.Update(Time.deltaTime); }
public virtual void AimAt(Vector2 target) { GunModel.AimAt(target); UpdateGunRenderer(); }