コード例 #1
0
ファイル: MpkFile.cs プロジェクト: ratzlaff/XCom-tools
            public void Read(BinaryReader br)
            {
                byte len = br.ReadByte();

                file = new string(br.ReadChars(len));
                type = (MpkEntryType)br.ReadByte();
            }
コード例 #2
0
ファイル: IMpkEntry.cs プロジェクト: pmprog/OpenXCOM.Tools
		public static IMpkEntry GetType(MpkEntryType typ)
		{
			if(!init)
				InitTypes();
			if(typeHash[typ]==null)
				return null;

			Type t = (Type)typeHash[typ];
			ConstructorInfo ci = t.GetConstructor(new Type[]{});
			return (IMpkEntry)ci.Invoke(new Object[]{});
		}
コード例 #3
0
        public static IMpkEntry GetType(MpkEntryType typ)
        {
            if (!init)
            {
                InitTypes();
            }
            if (typeHash[typ] == null)
            {
                return(null);
            }

            Type            t  = (Type)typeHash[typ];
            ConstructorInfo ci = t.GetConstructor(new Type[] {});

            return((IMpkEntry)ci.Invoke(new Object[] {}));
        }
コード例 #4
0
ファイル: MpkFile.cs プロジェクト: pmprog/OpenXCOM.Tools
			public void Read(BinaryReader br)
			{
				byte len = br.ReadByte();
				file = new string(br.ReadChars(len));
				type = (MpkEntryType)br.ReadByte();
			}
コード例 #5
0
ファイル: MpkFile.cs プロジェクト: pmprog/OpenXCOM.Tools
			public MpkEntryHeader(string file, MpkEntryType type){this.file=file;this.type=type;}
コード例 #6
0
ファイル: MpkFile.cs プロジェクト: ratzlaff/XCom-tools
 public MpkEntryHeader(string file, MpkEntryType type)
 {
     this.file = file; this.type = type;
 }