コード例 #1
0
        public static BtlCut_ResultShip Instantiate(BtlCut_ResultShip prefab, Transform parent, Vector3 pos, ShipModel_BattleResult model)
        {
            BtlCut_ResultShip btlCut_ResultShip = Object.Instantiate <BtlCut_ResultShip>(prefab);

            btlCut_ResultShip.get_transform().set_parent(parent);
            btlCut_ResultShip.get_transform().set_localPosition(pos);
            btlCut_ResultShip.get_transform().localScaleOne();
            return(btlCut_ResultShip.VitualCtor(model));
        }
コード例 #2
0
        public static BtlCut_ResultShip Instantiate(BtlCut_ResultShip prefab, Transform parent, Vector3 pos, ShipModel_BattleResult model)
        {
            BtlCut_ResultShip btlCut_ResultShip = UnityEngine.Object.Instantiate(prefab);

            btlCut_ResultShip.transform.parent        = parent;
            btlCut_ResultShip.transform.localPosition = pos;
            btlCut_ResultShip.transform.localScaleOne();
            return(btlCut_ResultShip.VitualCtor(model));
        }
コード例 #3
0
 public bool Init(System.Tuple <BattleResultModel, Transform> infos)
 {
     _listResultShips = new List <BtlCut_ResultShip>(infos.Item1.Ships_f.Length);
     for (int i = 0; i < _listResultShips.Capacity; i++)
     {
         if (infos.Item1.Ships_f[i] != null)
         {
             _listResultShips.Add(BtlCut_ResultShip.Instantiate(((Component)infos.Item2).GetComponent <BtlCut_ResultShip>(), transform, new Vector3(0f, 150f - (float)(i * 60), 0f), infos.Item1.Ships_f[i]));
         }
     }
     return(true);
 }
コード例 #4
0
 public bool Init(Tuple <BattleResultModel, Transform> infos)
 {
     this._listResultShips = new List <BtlCut_ResultShip>(infos.get_Item1().Ships_f.Length);
     for (int i = 0; i < this._listResultShips.get_Capacity(); i++)
     {
         if (infos.get_Item1().Ships_f[i] != null)
         {
             this._listResultShips.Add(BtlCut_ResultShip.Instantiate(infos.get_Item2().GetComponent <BtlCut_ResultShip>(), this.transform, new Vector3(0f, 150f - (float)(i * 60), 0f), infos.get_Item1().Ships_f[i]));
         }
     }
     return(true);
 }