private void DropStep() { if (!isDropping) { return; } isDropping = true; Collider2D collide = Physics2D.OverlapPoint(stepState.DropTarget); isHolding = false; if (collide == null) { Rock.SendMessage("SetSolid", true); } else { IDroppable droppable = collide.GetComponent(typeof(IDroppable)) as IDroppable; if (droppable != null) { StepManager.OnEndOfStep += (Action)(() => { GameObject.Destroy(Rock.gameObject); droppable.OnDrop(); }); } else { Game.Fail(); } } }
private void DropLate(IDroppable droppable) { GameObject.Destroy(Rock.gameObject); droppable.OnDrop(); }