Exemplo n.º 1
0
        private void Start()
        {
            TaModel     A = GameObject.Find("A").GetComponent <TaModel>();
            TaModel     B = GameObject.Find("B").GetComponent <TaModel>();
            TaModel     C = GameObject.Find("C").GetComponent <TaModel>();
            TaModel     D = GameObject.Find("D").GetComponent <TaModel>();
            IphoneModel a = GameObject.Find("ball0").GetComponent <IphoneModel>();
            IphoneModel b = GameObject.Find("ball1").GetComponent <IphoneModel>();

            dicTa.Add(0, A);
            dicTa.Add(1, B);
            dicTa.Add(2, C);
            dicTa.Add(3, D);
            dicIphoneModel.Add(0, a);
            dicIphoneModel.Add(1, b);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 判断当前信号范围内是否有可以连通的手机
 /// </summary>
 /// <param name="currentGoPhone">去电的号码</param>
 /// <param name="list"></param>
 /// <returns></returns>
 public void IsLink(int callphone, int targetPhone, WatchableList <int> list)
 {
     if (list.Contains(targetPhone))
     {
         var         obj               = FindObjectsOfType <IphoneModel>();
         IphoneModel _callphoneModel   = null;
         IphoneModel _targetPhoneModel = null;
         for (int j = 0; j < obj.Length; j++)
         {
             if (obj[j].iphoneID == callphone)
             {
                 ((IphoneEntity)obj[j].DataEntity).currentState = 2;
                 _callphoneModel = obj[j];
             }
             else if (obj[j].iphoneID == targetPhone)
             {
                 ((IphoneEntity)obj[j].DataEntity).currentState = 2;
                 _targetPhoneModel = obj[j];
             }
         }
         _callphoneModel.targetIphoneModel   = _targetPhoneModel;
         _targetPhoneModel.targetIphoneModel = _callphoneModel;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void Start()
 {
     iphoneModel  = GetComponent <IphoneModel>();
     iphoneEntity = (IphoneEntity)iphoneModel.DataEntity;
 }