Skip to content

Commit

Permalink
animes
Browse files Browse the repository at this point in the history
  • Loading branch information
neuroprod committed Nov 28, 2023
1 parent 89e2a47 commit 28b04fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/CharacterHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ export default class CharacterHandler {
this.tl.to(this.charPos,{"x":this.floorPos.x,"y":this.floorPos.y,"z":this.floorPos.z,duration:duration ,ease: "none"},pos)

pos+=duration;

this.tl.call(()=>{ this.animationMixer.setAnimation("idle",0);},[],pos)
let nextAnime = "idle"
if(Math.random()>0.7)nextAnime ="bored"
this.tl.call(()=>{ this.animationMixer.setAnimation(nextAnime ,0);},[],pos)
this.tl.to(this.animationMixer,{"mixValue":1,duration:0.5,ease: "none"},pos)
this.tl.to(this,{"characterRot":0 ,duration:0.5,ease: "none"},pos)

Expand Down

0 comments on commit 28b04fc

Please sign in to comment.