Use Set/Get functions in AnimationController instead of properties for consistency.

This commit is contained in:
Lasse Öörni 2011-05-02 11:09:01 +00:00
parent 7c45da5588
commit 8cc3b18944
2 changed files with 19 additions and 19 deletions

View File

@ -243,7 +243,7 @@ class Ninja : GameObject
controller.SetAnimation("Models/Ninja_Attack1.ani", ANIM_ATTACK, false, true, 1.0, 0.75, 0.0, 0.0, false);
controller.SetFade("Models/Ninja_Attack1.ani", 0.0, 0.5);
controller.priority["Models/Ninja_Attack1.ani"] = 1;
controller.SetPriority("Models/Ninja_Attack1.ani", 1);
Node@ snowball = SpawnObject(node.position + vel * timeStep + q * ninjaThrowPosition, GetAim(), "SnowBall");
RigidBody@ snowballBody = snowball.GetComponent("RigidBody");

View File

@ -626,25 +626,25 @@ static void RegisterAnimationController(asIScriptEngine* engine)
engine->RegisterObjectMethod("AnimationController", "bool SetBlending(const String& in, int, const String& in)", asMETHOD(AnimationController, SetBlending), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetFade(const String& in, float, float)", asMETHOD(AnimationController, SetFade), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetFadeOthers(const String& in, float, float)", asMETHOD(AnimationController, SetFadeOthers), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetPriority(const String& in, int)", asMETHOD(AnimationController, SetPriority), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetStartBone(const String& in, const String& in)", asMETHOD(AnimationController, SetStartBone), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetTime(const String& in, float)", asMETHOD(AnimationController, SetTime), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetWeight(const String& in, float)", asMETHOD(AnimationController, SetWeight), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetLooped(const String& in, bool)", asMETHOD(AnimationController, SetLooped), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetGroup(const String& in, uint8)", asMETHOD(AnimationController, SetGroup), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetSpeed(const String& in, float)", asMETHOD(AnimationController, SetSpeed), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool SetAutoFade(const String& in, float)", asMETHOD(AnimationController, SetAutoFade), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool HasAnimation(const String& in) const", asMETHOD(AnimationController, HasAnimation), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_priority(const String& in, int)", asMETHOD(AnimationController, SetPriority), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "int get_priority(const String& in) const", asMETHOD(AnimationController, GetPriority), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_startBone(const String& in, const String& in)", asMETHOD(AnimationController, SetStartBone), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "const String& get_startBone(const String& in) const", asMETHOD(AnimationController, GetStartBoneName), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_time(const String& in, float)", asMETHOD(AnimationController, SetTime), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float get_time(const String& in) const", asMETHOD(AnimationController, GetTime), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_weight(const String& in, float)", asMETHOD(AnimationController, SetWeight), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float get_weight(const String& in) const", asMETHOD(AnimationController, GetWeight), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_looped(const String& in, bool)", asMETHOD(AnimationController, SetLooped), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool get_looped(const String& in) const", asMETHOD(AnimationController, IsLooped), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float get_length(const String& in) const", asMETHOD(AnimationController, GetLength), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_group(const String& in, uint8)", asMETHOD(AnimationController, SetGroup), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "uint8 get_group(const String& in) const", asMETHOD(AnimationController, GetGroup), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_speed(const String& in, float)", asMETHOD(AnimationController, SetSpeed), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float get_speed(const String& in) const", asMETHOD(AnimationController, GetSpeed), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool set_autoFade(const String& in, float)", asMETHOD(AnimationController, SetAutoFade), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float get_autoFade(const String& in) const", asMETHOD(AnimationController, GetAutoFade), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float get_fadeTarget(const String& in) const", asMETHOD(AnimationController, GetFadeTarget), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "int GetPriority(const String& in) const", asMETHOD(AnimationController, GetPriority), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "const String& GetStartBone(const String& in) const", asMETHOD(AnimationController, GetStartBoneName), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float GetTime(const String& in) const", asMETHOD(AnimationController, GetTime), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float GetWeight(const String& in) const", asMETHOD(AnimationController, GetWeight), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "bool GetLooped(const String& in) const", asMETHOD(AnimationController, IsLooped), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float GetLength(const String& in) const", asMETHOD(AnimationController, GetLength), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "uint8 GetGroup(const String& in) const", asMETHOD(AnimationController, GetGroup), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float GetSpeed(const String& in) const", asMETHOD(AnimationController, GetSpeed), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float GetAutoFade(const String& in) const", asMETHOD(AnimationController, GetAutoFade), asCALL_THISCALL);
engine->RegisterObjectMethod("AnimationController", "float GetFadeTarget(const String& in) const", asMETHOD(AnimationController, GetFadeTarget), asCALL_THISCALL);
}
static void RegisterBillboardSet(asIScriptEngine* engine)