public void EndSlowDown(TimeBubbleControl timeBubbleControl) { OnSlowEnd(); if (myRigidbody) { myRigidbody.velocity *= slowFactorHolder; } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.U)) { TimeBubbleControl newTimeBubble = Instantiate(timeBubblePrefab, transform.position, transform.rotation); newTimeBubble.InitializeBubble(gameObject); } }
public void SlowDown(float slowFactor, TimeBubbleControl timeBubbleControl) { Debug.Log("slw"); OnSlowed(slowFactor); if (myRigidbody) { slowFactorHolder = slowFactor; myRigidbody.velocity /= slowFactor; } }