コード例 #1
0
        public QuatKey(BinaryReader reader, NiFile niFile, KeyType type) : base(reader, niFile)
        {
            if (type != (KeyType)4)
            {
                Time  = reader.ReadSingle();
                Value = (T)Activator.CreateInstance(typeof(T), reader, niFile);
            }

            if (type == (KeyType)3)
            {
                TBC = new NiTBC(reader, niFile);
            }
        }
コード例 #2
0
        public NiKey(BinaryReader reader, NiFile niFile, KeyType type) : base(reader, niFile)
        {
            Time = reader.ReadSingle();

            Value = (T)Activator.CreateInstance(typeof(T), reader, niFile);

            if (type == (KeyType)2)
            {
                Forward   = (T)Activator.CreateInstance(typeof(T), reader, niFile);
                Backwards = (T)Activator.CreateInstance(typeof(T), reader, niFile);
            }

            if (type == (KeyType)3)
            {
                TBC = new NiTBC(reader, niFile);
            }
        }