DespawnMeteorite() public method

public DespawnMeteorite ( Meteorite, meteorite ) : void
meteorite Meteorite,
return void
Example #1
0
    void Update()
    // Move forward! (The rigidbody is kinematic, so movement comes from the transform)
    {
        if (transform.position.magnitude > maxDistance)
        {
            demoControl.DespawnMeteorite(this);
        }

        transform.position += transform.forward * speed * Time.deltaTime;
    }