public void SetDefaultState() { Fish.GetComponent <Animation>().PlayQueued("Moving", QueueMode.PlayNow); statePath = StatePath.Fish; MainPath.Target = Fish.transform; BackFeedingPath.Target = null; BackFeedingPath.Stop(); FeedingPath.Target = null; FeedingPath.Stop(); SetDefaultColor(); MainPath.Play(); }
public void SetFeedingPath() { FeedingPath.velocityBias = Random.Range(0.15f, 0.8f); setDirectFeed = true; FeedingPath.Waypoints[0].Position = new Vector3(Fish.transform.position.x, Fish.transform.position.y, Fish.transform.position.z); MainPath.Target = null; FeedingPath.Target = Fish.transform; MainPath.Stop(); FeedingPath.Play(); statePath = StatePath.Feed; }
public void StartCrawling(GameObject crawler) { this.crawler = crawler; pathMagic = GetComponent <PathMagic>(); pathMagic.Target = crawler.transform; pathMagic.waypoints[pathMagic.waypoints.Length - 1].reached.AddListener(crawler.GetComponent <CrawlerAI>().AttackPortal); pathMagic.Play(); }
public void GoToRoundPath() { PathExitFromCage.Pause(); PathExitFromCage.Target = null; PathRoundLion.Target = TargetLion; // PathExitFromCage.Stop(); PathRoundLion.Play(); }
IEnumerator SpawnFeedAfterHiT() { yield return(new WaitForSeconds(2.5f)); CommonData.prefabs.gameobjectLookup["LowerJaw"].SetActive(false); PathShark.Play(); //GetNewFeed(); }
public void GoToFishingPath() { FeedingPath.Target = null; FishingPath.Target = Fish.transform; FeedingPath.Stop(); FishingPath.Play(); statePath = StatePath.Fishing; }
public void SetPath_2() { Path_2.Waypoints[0].Position = new Vector3(gameObject.transform.position.x, gameObject.transform.position.y, gameObject.transform.position.z); Path_1.Stop(); Path_1.Target = null; Path_2.Target = gameObject.transform; Path_2.Play(); Path_3.Play(); set = false; }
public void BackMainPath() { setDirectFeed = false; setDirectFishing = false; BackFeedingPath.Waypoints[0].Position = new Vector3(Fish.transform.position.x, Fish.transform.position.y, Fish.transform.position.z); FeedingPath.Target = null; BackFeedingPath.Target = Fish.transform; FeedingPath.Stop(); BackFeedingPath.Play(); statePath = StatePath.BackFeeding; }
public void StartFeed() { Debug.Log("Start Feeding"); settingCatch = true; render.enabled = true; collider.enabled = true; pathFeed.Stop(); pathFeed.Play(); for (int i = 0; i < Fishs.Count; i++) { Fishs[i].SetFeedingPath(); } }
public void StartFlying(GameObject fly) { this.fly = fly; pathMagic = GetComponent <PathMagic>(); pathMagic.Target = fly.transform; Transform globalTarget = GameObject.FindGameObjectWithTag("Portal").transform; pathMagic.globalLookAt = globalTarget; fly.GetComponent <FlyDroneAIPath>().SetPath(this); pathMagic.Play(); }
public void StartExitCrocodile() { PathExitCrocodile.Play(); }
IEnumerator Play() { yield return(new WaitForSeconds(0.1f)); Path_1.Play(); }
public void StartExitFromCage() { PathExitFromCage.Target = TargetLion; AnimatorLion.SetTrigger("Walk"); PathExitFromCage.Play(); }
public void Rewind() { PathArrow.Stop(); PathArrow.Play(); }
public void Resume() { pathMagic.UpdateTarget(); pathMagic.Play(); }