public void RunQuest() { gameObject.SetActive(true); character = FindObjectOfType <CharactersOwner>().Left.GetComponent <MovementComponent>(); activateTime = Time.time; oldSpeed = character.MoveVelocity; character.MoveVelocity = 0; character.GetComponent <Rigidbody2D>().velocity = new Vector2(); transform.position = character.transform.position + 0.25f * Vector3.up; SetAllChild(true); MobsFactory[] factories = FindObjectsOfType <MobsFactory>(); left = factories[0]; right = factories[1]; if (left.transform.position.x > right.transform.position.x) { var temp = left; left = right; right = temp; } left.DeltaTime /= 3; right.DeltaTime = 1000000; }