public void OpenWindow(TerrainTriggerData data)
 {
     m_NodeInfo = data;
     m_InputBuffer = new List<string>(4);
     for (int i = 0; i < 5; ++i)
     {
         m_InputBuffer.Add(string.Empty);
     }
     m_InputBuffer[0] = m_NodeInfo.TargetMethodId.ToString();
     m_InputBuffer[1] = m_NodeInfo.EnterLimitMethodId.ToString();
     m_InputBuffer[2] = m_NodeInfo.ExitLimitMethodId.ToString();
     m_InputBuffer[3] = m_NodeInfo.EnterFuncMethodId.ToString();
     m_InputBuffer[4] = m_NodeInfo.ExitFuncMethodId.ToString();
 }
    public void InitTrigger(TerrainTriggerData data,bool isShowTrigger)
    {
        m_bIsShowObject = isShowTrigger;
        m_CurrentTargetList = new HashSet<Ilife>();
        m_NodeData = data;
        m_TransformData = new TransformDataBase();
        m_TransformData.SetPosition(m_NodeData.Pos.GetVector3());
        m_TransformData.SetRotation(m_NodeData.Rot.GetVector3());
        m_TransformData.SetScale(m_NodeData.Scale.GetVector3());

        if (m_bIsShowObject)
        {
            //create obj
            CreateObject();
        }
    }
예제 #3
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 10:
                    if (field.Type == TType.I32)
                    {
                        ID = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 20:
                    if (field.Type == TType.String)
                    {
                        MapName = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 30:
                    if (field.Type == TType.String)
                    {
                        MapSceneName = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 40:
                    if (field.Type == TType.String)
                    {
                        MapResName = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 50:
                    if (field.Type == TType.List)
                    {
                        {
                            TriggerDataList = new List <TerrainTriggerData>();
                            TList _list0 = iprot.ReadListBegin();
                            for (int _i1 = 0; _i1 < _list0.Count; ++_i1)
                            {
                                TerrainTriggerData _elem2 = new TerrainTriggerData();
                                _elem2 = new TerrainTriggerData();
                                _elem2.Read(iprot);
                                TriggerDataList.Add(_elem2);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 60:
                    if (field.Type == TType.List)
                    {
                        {
                            NpcDataList = new List <TerrainNpcData>();
                            TList _list3 = iprot.ReadListBegin();
                            for (int _i4 = 0; _i4 < _list3.Count; ++_i4)
                            {
                                TerrainNpcData _elem5 = new TerrainNpcData();
                                _elem5 = new TerrainNpcData();
                                _elem5.Read(iprot);
                                NpcDataList.Add(_elem5);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 70:
                    if (field.Type == TType.Struct)
                    {
                        PlayerInitPos = new PlayerInitPosData();
                        PlayerInitPos.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 10:
         if (field.Type == TType.I32) {
           ID = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 20:
         if (field.Type == TType.String) {
           MapName = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 30:
         if (field.Type == TType.String) {
           MapSceneName = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 40:
         if (field.Type == TType.String) {
           MapResName = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 50:
         if (field.Type == TType.List) {
           {
             TriggerDataList = new List<TerrainTriggerData>();
             TList _list0 = iprot.ReadListBegin();
             for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
             {
               TerrainTriggerData _elem2 = new TerrainTriggerData();
               _elem2 = new TerrainTriggerData();
               _elem2.Read(iprot);
               TriggerDataList.Add(_elem2);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 60:
         if (field.Type == TType.List) {
           {
             NpcDataList = new List<TerrainNpcData>();
             TList _list3 = iprot.ReadListBegin();
             for( int _i4 = 0; _i4 < _list3.Count; ++_i4)
             {
               TerrainNpcData _elem5 = new TerrainNpcData();
               _elem5 = new TerrainNpcData();
               _elem5.Read(iprot);
               NpcDataList.Add(_elem5);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 70:
         if (field.Type == TType.Struct) {
           PlayerInitPos = new PlayerInitPosData();
           PlayerInitPos.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }