Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
    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;
    }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 4
0
 public void GoToRoundPath()
 {
     PathExitFromCage.Pause();
     PathExitFromCage.Target = null;
     PathRoundLion.Target    = TargetLion;
     // PathExitFromCage.Stop();
     PathRoundLion.Play();
 }
Ejemplo n.º 5
0
    IEnumerator SpawnFeedAfterHiT()
    {
        yield return(new WaitForSeconds(2.5f));

        CommonData.prefabs.gameobjectLookup["LowerJaw"].SetActive(false);
        PathShark.Play();
        //GetNewFeed();
    }
Ejemplo n.º 6
0
 public void GoToFishingPath()
 {
     FeedingPath.Target = null;
     FishingPath.Target = Fish.transform;
     FeedingPath.Stop();
     FishingPath.Play();
     statePath = StatePath.Fishing;
 }
Ejemplo n.º 7
0
 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;
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 9
0
 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();
     }
 }
Ejemplo n.º 10
0
    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();
    }
Ejemplo n.º 11
0
 public void StartExitCrocodile()
 {
     PathExitCrocodile.Play();
 }
Ejemplo n.º 12
0
    IEnumerator Play()
    {
        yield return(new WaitForSeconds(0.1f));

        Path_1.Play();
    }
Ejemplo n.º 13
0
 public void StartExitFromCage()
 {
     PathExitFromCage.Target = TargetLion;
     AnimatorLion.SetTrigger("Walk");
     PathExitFromCage.Play();
 }
Ejemplo n.º 14
0
 public void Rewind()
 {
     PathArrow.Stop();
     PathArrow.Play();
 }
Ejemplo n.º 15
0
 public void Resume()
 {
     pathMagic.UpdateTarget();
     pathMagic.Play();
 }