コード例 #1
0
		public idMD5Anim GetAnimation(string name)
		{
			idMD5Anim anim;

			if(_animations.ContainsKey(name) == true)
			{
				anim = _animations[name];
			}
			else
			{
				if(Path.GetExtension(name) != idRenderModel_MD5.MeshAnimationExtension)
				{
					return null;
				}

				anim = new idMD5Anim();

				if(anim.LoadAnimation(name) == false)
				{
					idConsole.Warning("Couldn't load anim: '{0}'", name);
					anim = null;
				}

				_animations.Add(name, anim);
			}

			return anim;
		}
コード例 #2
0
        public idMD5Anim GetAnimation(string name)
        {
            idMD5Anim anim;

            if (_animations.ContainsKey(name) == true)
            {
                anim = _animations[name];
            }
            else
            {
                if (Path.GetExtension(name) != idRenderModel_MD5.MeshAnimationExtension)
                {
                    return(null);
                }

                anim = new idMD5Anim();

                if (anim.LoadAnimation(name) == false)
                {
                    idConsole.Warning("Couldn't load anim: '{0}'", name);
                    anim = null;
                }

                _animations.Add(name, anim);
            }

            return(anim);
        }
コード例 #3
0
ファイル: idDeclModel.cs プロジェクト: iainmckay/idtech4.net
		public void SetAnimation(idDeclModel modelDef, string sourceName, string animName, idMD5Anim[] md5anims)
		{
			_modelDef = modelDef;
			_anims = md5anims;
			
			_realName = sourceName;
			_name = animName;
			_animFlags = new AnimationFlags();
			_frameCommands.Clear();
			_frameLookups.Clear();
		}