private void LeaveBox() { boxCollider.enabled = true; NvpEventController.Events(MyEvent.LeaveBox).TriggerEvent(this, null); currentKiste.Interact(gameObject, new BoxInteractEventArgs(transform.position.y * transform.localScale.y, false)); transform.localScale /= boxSmall; currentKiste = null; }
private void GoInBox(Kiste kiste) { boxCollider.enabled = false; NvpEventController.Events(MyEvent.HideInBox).TriggerEvent(this, null); currentKiste = kiste; kiste.Interact(gameObject, new BoxInteractEventArgs(transform.position.y * transform.localScale.y, true)); transform.localScale *= boxSmall; transform.position = kiste.gameObject.transform.position; }