Example #1
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player");

        PMScript = (Player_Movement)player.GetComponent(typeof(Player_Movement));

        speed = PMScript.GetVSpeed();
    }
Example #2
0
    public void FireBullet()
    {
        if (canFireIn > 0)
        {
            return;
        }

        var direction = Vector2.up;

        var bullet = (Bullet)Instantiate(Bullet, transform.position, transform.rotation);

        bullet.Initialize(gameObject, direction, PMScript.GetVSpeed());
    }