/// <summary> /// What to do when the object is grabbed /// </summary> /// <param name="collision"></param> internal void OnObjectGrabbed(Collider2D hookable) { targetHookable = hookable.GetComponent <IHookable>(); targetHookable.Hook(hookPos.transform); targetTransform = hookable.transform; state = HookState.Hooked; }
internal void Clear(bool throwObj = false) { if (targetHookable != null && throwObj) { targetHookable.Throw(Vector2.zero); } targetHookable = null; targetTransform = null; state = HookState.Empty; }
public static void ThrowErrorMessage(this IHookable hookable, IErrorMessage message) { hookable.hook.ThrowErrorMessage(message); }
public static void Unhook(this IHookable hookable) { hookable.hook.Unhook(); }
public static void HookTo(this IHookable hookable, ErrorManager em) { hookable.hook.HookTo(em); }
public void DefaultPreset() { hookable = BoundEntityModifierDefault.Hookable; }