Exemplo n.º 1
0
    IEnumerator MoveToTarget(List <RotueNode> rotueNodes, float timeEachSetp, int id)
    {
        // Debug.Log(timeEachSetp);
        TargetID = id;
        //yield return new WaitForSeconds(timeEachSetp);
        // SoundMangager.instance.GoThrough();
        //  CanvasMangager.instance.HideCurretTitle();
        // Debug.Log(rotueNodes.Count+ "rotueNodes 数量");
        //  BottomBarCtr.instance.UpdateBottomBar(id + 1, ReadJson.NodeList.Count);
        for (int i = 0; i < rotueNodes.Count; i++)
        {
            if (i == rotueNodes.Count - 1)//going in
            {
                DefaultNodesCtr.hideMainPic();
                DefaultNodesCtr.ShowDescription(id);
                yield return(new WaitForSeconds(.5f));

                //  SoundMangager.instance.GoThrough();
                MoveTo(rotueNodes[i].pos, timeEachSetp, () => updatePerviousID(id));
                RotateTo(rotueNodes[i].rotationAngle, timeEachSetp);

                //CanvasMangager.instance.UpdateTitle(titleNum, CanvasMangager.instance.MainTitle);//show title
            }
            else
            {
                DefaultNodesCtr.showMainPic();
                MoveTo(rotueNodes[i].pos, timeEachSetp, () => updatePerviousID(id));
                RotateTo(rotueNodes[i].rotationAngle, timeEachSetp);
            }


            yield return(new WaitForSeconds(timeEachSetp));
        }
    }
Exemplo n.º 2
0
 public override void initialization()
 {
     base.initialization();
     if (instance == null)
     {
         instance = this;
     }
 }