Esempio n. 1
0
    public void LaunchRocket()
    {
        GameObject       rocketObject = Instantiate(rocketPrefab, rigidbody2d.position + lookDirection * new Vector2(0.5f, 0.5f), lookRotation);
        RocketController rocket       = rocketObject.GetComponent <RocketController>();

        rocket.SetLauncherGameObject(this);
        rocket.SetRocketDamage(rocketDamage);
        rocket.Launch(lookDirection, rocketSpeed);
    }