Esempio n. 1
0
    protected override void ShootSecondary()
    {
        Vector3  startpos = transform.position + new Vector3(0, 0.3f, 0);
        Fireball fireball = Instantiate(Resources.Load <Fireball>("Fireball/Fireball"), startpos, Camera.main.transform.rotation);

        fireball.LoadFromWeapon(this);
        charge = 0;
    }
Esempio n. 2
0
    protected override void ShootPrimary()
    {
        Vector3  startpos = transform.position + new Vector3(0, 0.3f, 0);
        Fireball fireball = Instantiate(Resources.Load <Fireball>("Fireball/Fireball"), startpos, Camera.main.transform.rotation);

        fireball.LoadFromWeapon(this);
        if (righthand)
        {
            fireball.transform.position += fireball.transform.right.normalized * 1.0f;
            fireball.transform.RotateAround(fireball.transform.position, fireball.transform.up, -0.6f);
        }
        else
        {
            fireball.transform.position += fireball.transform.right.normalized * -1.0f;
            fireball.transform.RotateAround(fireball.transform.position, fireball.transform.up, 0.6f);
        }
        righthand = !righthand;
    }