character foot placement also works when moving; leaning control; improvements;
This commit is contained in:
@@ -2374,11 +2374,15 @@ namespace wi::scene
|
||||
}
|
||||
facing_next = direction;
|
||||
}
|
||||
void CharacterComponent::AddAnimation(wi::ecs::Entity entity)
|
||||
void CharacterComponent::Lean(float amount)
|
||||
{
|
||||
leaning_next = amount;
|
||||
}
|
||||
void CharacterComponent::AddAnimation(Entity entity)
|
||||
{
|
||||
animations.push_back(entity);
|
||||
}
|
||||
void CharacterComponent::PlayAnimation(wi::ecs::Entity entity)
|
||||
void CharacterComponent::PlayAnimation(Entity entity)
|
||||
{
|
||||
if (currentAnimation != entity)
|
||||
{
|
||||
@@ -2386,6 +2390,10 @@ namespace wi::scene
|
||||
currentAnimation = entity;
|
||||
}
|
||||
}
|
||||
void CharacterComponent::StopAnimation()
|
||||
{
|
||||
currentAnimation = INVALID_ENTITY;
|
||||
}
|
||||
void CharacterComponent::SetAnimationAmount(float amount)
|
||||
{
|
||||
anim_amount = amount;
|
||||
|
||||
Reference in New Issue
Block a user