public void onPlayerLand(PhysicalPlayerController pp) { // CharacterHandler.instance.handlers.TryGetValue(fontData.id, out _onPlayerEnter); if (_onPlayerEnter != null) { _onPlayerEnter(pp, this); } }
public void trigger() { player = FindObjectOfType <PhysicalPlayerController>(); _curRadius = Vector2.Distance(player.tf.position, tf.position); _radiusDecrease = (_curRadius - _minRadius) / tracingTime; _curAngle = Vector2.Angle(Vector2.zero, tf.position - player.tf.position); _angleDecrease = tracingAngle * 3.14f / tracingTime; _tracedTime = 0; _curCenter = player.tf.position; common.TimerManager.instance.addEventListeners(this); }
public void OnTriggerExit2D(Collider2D coll) { GameObject obj = coll.gameObject; switch (obj.tag) { case Config.TAG_PLAYER: PhysicalPlayerController p = obj.GetComponent <PhysicalPlayerController>(); p.leaveIce(); break; } }
void OnTriggerEnter2D(Collider2D other) { GameObject obj = other.gameObject; switch (obj.tag) { case Config.TAG_PLAYER: PhysicalPlayerController p = obj.GetComponent <PhysicalPlayerController>(); p.onIce(); break; } }
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(); }
public void onPlayerLand(PhysicalPlayerController player) { }
public static void angleBracketUpTrigger(PhysicalPlayerController pp, CharacterCell cell) { cell.tf.DOLocalMoveY(cell.tf.localPosition.y - 5, 0.1f).SetLoops(2, LoopType.Yoyo); pp.Rebound(Config.Direction.None); }
public static void underLineTriggerHandler(PhysicalPlayerController pp, CharacterCell cell) { pp.tf.SetParent(cell.tf); }