コード例 #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();
 }
コード例 #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;
    }
コード例 #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();
 }
コード例 #4
0
 public void GoToRoundPath()
 {
     PathExitFromCage.Pause();
     PathExitFromCage.Target = null;
     PathRoundLion.Target    = TargetLion;
     // PathExitFromCage.Stop();
     PathRoundLion.Play();
 }
コード例 #5
0
    IEnumerator SpawnFeedAfterHiT()
    {
        yield return(new WaitForSeconds(2.5f));

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

        Path_1.Play();
    }
コード例 #13
0
 public void StartExitFromCage()
 {
     PathExitFromCage.Target = TargetLion;
     AnimatorLion.SetTrigger("Walk");
     PathExitFromCage.Play();
 }
コード例 #14
0
ファイル: ControllerArrow.cs プロジェクト: Oksanny/NZ_Scale_1
 public void Rewind()
 {
     PathArrow.Stop();
     PathArrow.Play();
 }
コード例 #15
0
 public void Resume()
 {
     pathMagic.UpdateTarget();
     pathMagic.Play();
 }