/** * is called to check if stone is in collider of onDeselectParent * * @param stone the Stone to check * @param parent the onDeselectParent to check */ public static bool IsStoneInColliderOfOnDeselectParent(Stone stone, CanHoldHookableObject parent) { return(parent.IsStoneInColliderOfCanHoldHookableObject(stone)); }
/** * checks if stone is child of CanHoldHookableObject * * @param stone Stone to check if it is child * @param canHoldHookableObject CanHoldHookableObject to check childs in * * TODO: should be called instead of Stone.contains() */ private static bool IsStoneInCanHoldHookableObject(Stone stone, CanHoldHookableObject canHoldHookableObject) { return(canHoldHookableObject.IsStoneInCanHoldHookableObject(stone)); }
/** * returns designated Vector3 position of stone from any CanHoldHookableObject knowing this stone * * @param parent CanHoldHookableObject where stone is part of * @param stone to find its position to */ public static Vector3 GetParentPositionOfChildStone(CanHoldHookableObject parent, Stone stone) { return(parent.GetPositionOfStoneChild(stone)); }
/** * remove a stone from canHoldHookableObject. Caution: no new parent for stone is set at this point! Instead this has to be done in event of new parent. * * @param stone to remove * @param canHoldHookableObject where stone should be removed */ public static void RemoveStoneFromCanHoldHookableObject(Stone stone, CanHoldHookableObject canHoldHookableObject) { canHoldHookableObject.RemoveStone(stone); }
/** * OnDeselectOnCanHoldHookableObject is called when a stone is deselected over a canHoldHookableObject * * @param stone: stone which is selected * @param canHoldHookableObject: object under the stone */ public static void OnDeselectOnCanHoldHookableObject(Stone stone, CanHoldHookableObject canHoldHookableObject) { canHoldHookableObject.StoneToCanHoldHookableObject(stone); }
/** * SetOnDeselectParentOfStone sets the onDeselectParent of the stone * * @param stone: stone which is selected * @param canHoldHookableObject: the parent to set */ public static void SetOnDeselectParentOfStone(Stone stone, CanHoldHookableObject canHoldHookableObject) { stone.SetOnDeselectParent(canHoldHookableObject); }
/** * SetOnDeselectParent sets the parent of the current frame * * @param canHoldHookableObject the parent to set */ public void SetOnDeselectParent(CanHoldHookableObject canHoldHookableObject) { _onDeselectParent = canHoldHookableObject; }