public override void Enter(FishController fish) { Fisherman fisherman = fish.target.GetComponent <AIMovement>().target.GetComponent <Fisherman>(); fisherman.fishOnHook = fish; fisherman.SetState(new HookedState()); fisherman.GetState().Enter(fish.target.GetComponent <AIMovement>().target.GetComponent <Fisherman>()); Debug.Log("Caught!"); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Pond" && collision.GetType() == typeof(EdgeCollider2D)) { Debug.Log("Reel it boy!"); player.CatchFish(); player.SetState(new WalkingState()); } }