示例#1
0
    //根据名字头 和 关卡  获取 景的list数据
    public List <string> GetListByFstNameAndGKNums(string nameFst)
    {
        string strName = nameFst + GetGKNum();

        print("?????      " + strName);
        print("?obj   " + GetDateByName.GetInstance().GetListByName(strName, ScreenDate.GetInstance()));
        return(GetDateByName.GetInstance().GetListByName(strName, ScreenDate.GetInstance()));
    }
示例#2
0
 public static ScreenDate GetInstance()
 {
     if (_instance == null)
     {
         _instance = new ScreenDate();
     }
     return(_instance);
 }
示例#3
0
    void GetZYJ(Transform obj, List <string> zyjList, float __z = 6)
    {
        //产生个数
        int           nums     = 7;
        string        nameFst  = "zyj" + "_" + ScreenDate.GetGKNum();
        List <string> jingNums = ScreenDate.GetInstance().GetListByFstNameAndGKNums("zyj_");  //new List<string> { "1", "2","3","4","5","6","8"};
        float         _x1      = obj.Find("tl").transform.position.x;
        float         _x2      = obj.Find("rd").transform.position.x;
        float         _y       = obj.Find("tl").transform.position.y - 4.2f;
        float         _rd      = UnityEngine.Random.Range(5, 9);
        //通过宽 来计算 多少树
        float d = Mathf.Abs(_x1 - _x2) / 2f;

        nums = (int)d;     //GlobalTools.GetRandomNum(10);
        //print("============================================================================================  name " + obj.name + "   _x " + _x1 + "  _x2 " + _x2 + "  _y  " + _y);
        SetJingByNums(nums, zyjList, _x1, _x2, _y, __z, 1f, -39, false, 0.5f, false);
    }