replaced files
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { BaseAnimation } from "../../../Enums/BaseAnimation";
|
||||
import { TURN_IDLE_FADE } from "../combatConstants";
|
||||
import { IPlayerState } from "../IPlayerState";
|
||||
import { PlayerContext } from "../PlayerContext";
|
||||
import { PlayerStateType } from "../PlayerStateType";
|
||||
|
||||
export class TurnToTargetState implements IPlayerState {
|
||||
enter(context: PlayerContext): void {
|
||||
context.rotation.setTargetWorldPosition(context.combatTargetWorldPosition);
|
||||
context.zeroVelocity();
|
||||
context.character.playAnimation(BaseAnimation.Idle, false, TURN_IDLE_FADE);
|
||||
}
|
||||
|
||||
exit(_context: PlayerContext): void {}
|
||||
|
||||
update(context: PlayerContext, _deltaTime: number): void {
|
||||
context.zeroVelocity();
|
||||
|
||||
if (!context.rotation.isComplete()) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.syncRotation();
|
||||
context.stateMachine.setState(PlayerStateType.Loot);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user