Exemple #1
0
    public void Load_Lv_Data(G0_Lv_Data data)
    {
        //決定這場要哪些地點
        int [] rD = new int [Now_Lv_Data.All_Target.Length];        //每個地點抽到的機率
        for (int i = 0; i < rD.Length; i++)
        {
            rD [i] = 1;
        }
        Now_Traget_Nobs = Dice <int> .GetNotRepeatingInts(Now_Lv_Data.N, rD);

        UI.Map.sprite = data.Map_Im;

        All_Photo = new List <G0_Photo_UICon> ();
        G0_Photo_UICon.AllPhoto = null;
        for (int i = 0; i < Now_Traget_Nobs.Length; i++)
        {
            int            Nob = Now_Traget_Nobs [i];
            G0_Photo_UICon r   = MyCalculate.SpObj(UI.Photo_Obj, UI.Photo_Parent.transform, Vector3.zero).GetComponent <G0_Photo_UICon> ();
            r.Load_Target_Data(data.All_Target [Nob]);
            All_Photo.Add(r);
        }

        All_Target = new List <G0_Target_UICOn> ();
        G0_Target_UICOn.AllTarget = null;
        for (int i = 0; i < data.All_Target.Length; i++)
        {
            G0_Target_Data  Target = data.All_Target [i];
            G0_Target_UICOn r      = MyCalculate.SpObj(UI.Traget_Obj, UI.Target_Parent.transform, (Vector2)Target.Pot).GetComponent <G0_Target_UICOn> ();
            r.Data = Target;
            All_Target.Add(r);
        }
    }
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (!IsOpen && G0_Photo_UICon.Now != null)
     {
         Now = this;
         Load_Target(this);
         // transform.localScale = Vector3.one * 1.5f;
     }
 }
 static public void Load_Target(G0_Target_UICOn g0_Target_UICon)
 {
     for (int i = 0; i < AllTarget.Count; i++)
     {
         if (AllTarget [i] == g0_Target_UICon)
         {
             AllTarget [i].transform.localScale = Vector3.one * 1.5f;
         }
         else
         {
             AllTarget [i].transform.localScale = Vector3.one;
         }
     }
 }