public virtual void Fire(GameObject shooter, Vector2 direction) { if (!cooldownRunning) { Vector2 startingPos = new Vector2(shooter.transform.position.x, shooter.transform.position.y); GameObject shot = Instantiate(bullet, startingPos, Quaternion.identity) as GameObject; // create GameObject bullet and throw lol BulletEngine bulletEngine = shot.GetComponent <BulletEngine>(); bulletEngine.Init(shooter, direction); // pass startingPos pour affiner le depart ? shot.transform.SetParent(shooter.transform.parent); StartCooldown(); } }