public void DoPosture(string posture) { if (aniStep == ANI_STEP.ANI_STEP_POSTURE2ACTION || aniStep == ANI_STEP.ANI_STEP_ACTION) { } else { animation.CrossFade(sPosture); aniStep = ANI_STEP.ANI_STEP_ACTION2POSTURE; } }
public void DoPosture(string posture) { if ( aniStep == ANI_STEP.ANI_STEP_POSTURE2ACTION || aniStep == ANI_STEP.ANI_STEP_ACTION ) { } else { animation.CrossFade( sPosture ); aniStep = ANI_STEP.ANI_STEP_ACTION2POSTURE; } }
// Update is called once per frame void Update() { if (bAction) { bAction = false; DoAction(sAction); } if (bPosture) { bPosture = false; DoPosture(sPosture); } if (aniStep == ANI_STEP.ANI_STEP_POSTURE2ACTION || aniStep == ANI_STEP.ANI_STEP_ACTION) { if ((animation[sAction].time + 0.3f) > animation[sAction].length) { animation.CrossFade(sPosture); aniStep = ANI_STEP.ANI_STEP_ACTION2POSTURE; } } }
// Update is called once per frame void Update() { if ( bAction ) { bAction = false; DoAction( sAction ); } if ( bPosture ) { bPosture = false; DoPosture( sPosture ); } if ( aniStep == ANI_STEP.ANI_STEP_POSTURE2ACTION || aniStep == ANI_STEP.ANI_STEP_ACTION ) { if ( (animation[sAction].time + 0.3f) > animation[sAction].length ) { animation.CrossFade( sPosture ); aniStep = ANI_STEP.ANI_STEP_ACTION2POSTURE; } } }
public void DoAction(string action) { sAction = action; animation.CrossFade(action); aniStep = ANI_STEP.ANI_STEP_POSTURE2ACTION; }
public void DoAction(string action) { sAction = action; animation.CrossFade( action ); aniStep = ANI_STEP.ANI_STEP_POSTURE2ACTION; }