Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 internal void Clear(bool throwObj = false)
 {
     if (targetHookable != null && throwObj)
     {
         targetHookable.Throw(Vector2.zero);
     }
     targetHookable  = null;
     targetTransform = null;
     state           = HookState.Empty;
 }
Exemplo n.º 3
0
 public static void ThrowErrorMessage(this IHookable hookable, IErrorMessage message)
 {
     hookable.hook.ThrowErrorMessage(message);
 }
Exemplo n.º 4
0
 public static void Unhook(this IHookable hookable)
 {
     hookable.hook.Unhook();
 }
Exemplo n.º 5
0
 public static void HookTo(this IHookable hookable, ErrorManager em)
 {
     hookable.hook.HookTo(em);
 }
Exemplo n.º 6
0
 public void DefaultPreset()
 {
     hookable = BoundEntityModifierDefault.Hookable;
 }