public void Fetch() { //Debug.Log("enter fetch"); montyStateManager.inFetch = true; montyStateManager.currentState = "fetch"; montyStateManager.SwitchState(); }
private void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "CanoePickUpRange") { inRangeOfCanoe = true; } if (other.gameObject.tag == "PutDownZone") { putDownTarget = other.gameObject.transform.GetChild(1).transform; spawnTarget = other.gameObject.transform.GetChild(0).transform; inRangeParkingSpace = true; } if (other.gameObject.tag == "FetchZoneExit") { interactionsManager.interaction.MarkAsComplete(); interactionsManager.inRange = false; Debug.Log("exit fetch"); playingFetch = false; montyStateManager.inFetch = false; montyStateManager.currentState = "roam"; montyStateManager.SwitchState(); montyStateActions.currentlyOnPath = false; Destroy(interactionsManager.interaction.gameObject); interactionsManager.interaction = null; } if (other.gameObject.tag == "FetchZoneSpawner") { montyStateVariables.GetFetchZoneExits(4).SetActive(true); montyStateVariables.GetFetchZoneExits(5).SetActive(true); } if (other.gameObject.tag == "LaunchingZone") { inRangeOfLaunchingZone = true; putDownTarget = other.gameObject.transform.GetChild(1).transform; spawnTarget = other.gameObject.transform.GetChild(0).transform; montyWalkTarget = other.gameObject.transform.GetChild(2).transform; } if (other.gameObject.tag == "Item") { itemToPickUp = other.gameObject; } if (other.gameObject.tag == "End") { gm.EndGame(); } if (other.gameObject.tag == "Camera Trigger") { cameraHandler.SwitchToAlt(); } }