Beispiel #1
0
 public void ReplaceRef(FrameEntryRefTypes type, int objRef)
 {
     if (refs.ContainsKey(type.ToString()))
     {
         refs[type.ToString()] = objRef;
     }
 }
Beispiel #2
0
        public void ReplaceRef(FrameEntryRefTypes type, int objRef)
        {
            if (!refs.ContainsKey(type))
            {
                AddRef(type, objRef);
                return;
            }

            refs[type] = objRef;
        }
Beispiel #3
0
        /// <summary>
        /// Add reference to this object.
        /// </summary>
        /// <param name="objRef"></param>
        public void AddRef(FrameEntryRefTypes type, int objRef)
        {
            switch (type)
            {
            case FrameEntryRefTypes.Mesh:
                refs.Add(MeshRef, objRef);
                break;

            case FrameEntryRefTypes.Material:
                refs.Add(MaterialRef, objRef);
                break;

            case FrameEntryRefTypes.BlendInfo:
                refs.Add(BlendInfoRef, objRef);
                break;

            case FrameEntryRefTypes.Skeleton:
                refs.Add(SkeletonRef, objRef);
                break;

            case FrameEntryRefTypes.SkeletonHierachy:
                refs.Add(SkeletonHierRef, objRef);
                break;

            case FrameEntryRefTypes.Parent1:
                refs.Add(Parent1Ref, objRef);
                break;

            case FrameEntryRefTypes.Parent2:
                refs.Add(Parent2Ref, objRef);
                break;

            default:
                refs.Add("UnknownType" + objRef, objRef);
                break;
            }
        }
Beispiel #4
0
        /// <summary>
        /// Remove reference from this object using the type of ref.
        /// </summary>
        /// <param name="objRef"></param>
        public void SubRef(FrameEntryRefTypes refType)
        {
            switch (refType)
            {
            case FrameEntryRefTypes.Mesh:
                removeRef(MeshRef);
                break;

            case FrameEntryRefTypes.Material:
                removeRef(MaterialRef);
                break;

            case FrameEntryRefTypes.BlendInfo:
                removeRef(BlendInfoRef);
                break;

            case FrameEntryRefTypes.Skeleton:
                removeRef(SkeletonRef);
                break;

            case FrameEntryRefTypes.SkeletonHierachy:
                removeRef(SkeletonHierRef);
                break;

            case FrameEntryRefTypes.Parent1:
                removeRef(Parent1Ref);
                break;

            case FrameEntryRefTypes.Parent2:
                removeRef(Parent2Ref);
                break;

            default:
                Console.WriteLine("Unknown type: " + refType);
                break;
            }
        }
Beispiel #5
0
        /// <summary>
        /// Remove reference from this object using the type of ref.
        /// </summary>
        /// <param name="objRef"></param>
        public void SubRef(FrameEntryRefTypes refType)
        {
            switch (refType)
            {
            case FrameEntryRefTypes.Mesh:
                removeRef("Mesh");
                break;

            case FrameEntryRefTypes.Material:
                removeRef("Material");
                break;

            case FrameEntryRefTypes.BlendInfo:
                removeRef("BlendInfo");
                break;

            case FrameEntryRefTypes.Skeleton:
                removeRef("Skeleton");
                break;

            case FrameEntryRefTypes.SkeletonHierachy:
                removeRef("SkeletonHierachy");
                break;

            case FrameEntryRefTypes.Parent1:
                removeRef("Parent1");
                break;

            case FrameEntryRefTypes.Parent2:
                removeRef("Parent2");
                break;

            default:
                Console.WriteLine("Unknown type: " + refType);
                break;
            }
        }
Beispiel #6
0
        /// <summary>
        /// Add reference to this object.
        /// </summary>
        /// <param name="objRef"></param>
        public void AddRef(FrameEntryRefTypes type, int objRef)
        {
            switch (type)
            {
            case FrameEntryRefTypes.Mesh:
                refs.Add("Mesh", objRef);
                break;

            case FrameEntryRefTypes.Material:
                refs.Add("Material", objRef);
                break;

            case FrameEntryRefTypes.BlendInfo:
                refs.Add("BlendInfo", objRef);
                break;

            case FrameEntryRefTypes.Skeleton:
                refs.Add("Skeleton", objRef);
                break;

            case FrameEntryRefTypes.SkeletonHierachy:
                refs.Add("SkeletonHierachy", objRef);
                break;

            case FrameEntryRefTypes.Parent1:
                refs.Add("Parent1", objRef);
                break;

            case FrameEntryRefTypes.Parent2:
                refs.Add("Parent2", objRef);
                break;

            default:
                refs.Add("UnknownType" + objRef, objRef);
                break;
            }
        }
Beispiel #7
0
 public void SubRef(FrameEntryRefTypes refType)
 {
     refs.TryRemove(refType);
 }
Beispiel #8
0
 public void AddRef(FrameEntryRefTypes type, int objRef)
 {
     refs.Add(type, objRef);
 }