/// <summary> /// method call when the weapon should shot. /// if the weapon can shot, create the new bullet using the factory and set the bullet vars ( the direction is the only one for now) /// </summary> public virtual void Fire() { // only if the weapon can shot will do it if (CanShot()) { // create the bullet using the factory Bullet newBullet = FactoryBullet.CreateBullet(bullet, InitialPosition.position); // add the properties, for now only the direccion newBullet.GetComponent <BulletMovement>().BulletDirection = BulletDirection; } }