Skip to content

Commit

Permalink
rename feeding to feed to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
nhanb committed Sep 17, 2023
1 parent 32f35a3 commit 042ca8a
Show file tree
Hide file tree
Showing 30 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ var DragSprites embed.FS
//go:embed sprites/hungry/*
var HungrySprites embed.FS

//go:embed sprites/feeding/*
var FeedingSprites embed.FS
//go:embed sprites/feed/*
var FeedSprites embed.FS

//go:embed sprites/walk-left/*
var WalkLeftSprites embed.FS
Expand Down Expand Up @@ -85,14 +85,14 @@ func NewAnim(sprites embed.FS, subdir string) *Anim {
return &Anim{frames}
}

var Idle, RightClick, Drag, Hungry, Feeding, WalkLeft, WalkRight *Anim
var Idle, RightClick, Drag, Hungry, Feed, WalkLeft, WalkRight *Anim

func init() {
Idle = NewAnim(IdleSprites, "idle")
Drag = NewAnim(DragSprites, "drag")
RightClick = NewAnim(RightClickSprites, "right-click")
Hungry = NewAnim(HungrySprites, "hungry")
Feeding = NewAnim(FeedingSprites, "feeding")
Feed = NewAnim(FeedSprites, "feed")
WalkLeft = NewAnim(WalkLeftSprites, "walk-left")
WalkRight = NewAnim(WalkRightSprites, "walk-right")
}
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion states.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (s *StateHungry) EndAnimHook(sm *StateMachine) {}

type StateFeed struct{}

func (s *StateFeed) Enter(sm *StateMachine) { sm.SetAnim(Feeding) }
func (s *StateFeed) Enter(sm *StateMachine) { sm.SetAnim(Feed) }
func (s *StateFeed) Update(sm *StateMachine) {}
func (s *StateFeed) EndAnimHook(sm *StateMachine) {
sm.SetState(&StateIdle{})
Expand Down

0 comments on commit 042ca8a

Please sign in to comment.