public void trigger() { CameraScroll cam = Camera.main.GetComponent <CameraScroll>(); cam.lockCamera(); center = cam.endPos; _player = FindObjectOfType <PhysicalPlayerController>(); cam.move(_player.tf, new Vector2(0.2f, 0.2f), 1.5f); common.TimerManager.instance.addEventListeners(this); closerTrigger(); }
public void trigger() { a = 1.5f * initSpeedX; delta.x = -initSpeedX; delta.y = -initspeedY; CameraScroll cam = Camera.main.GetComponent <CameraScroll>(); cam.lockCamera(); _player = FindObjectOfType <PhysicalPlayerController>(); cam.move(_player.tf, new Vector2(0.2f, 0.2f), 1.5f); common.TimerManager.instance.addEventListeners(this); closerTrigger(); }