mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
example/mascot: Remove unused variable 'state'
This commit is contained in:
parent
4eedeb6ab7
commit
77b7e961ff
@ -81,20 +81,12 @@ const (
|
|||||||
left
|
left
|
||||||
)
|
)
|
||||||
|
|
||||||
type state int
|
|
||||||
|
|
||||||
const (
|
|
||||||
walking state = iota
|
|
||||||
jumping
|
|
||||||
)
|
|
||||||
|
|
||||||
type mascot struct {
|
type mascot struct {
|
||||||
x16 int
|
x16 int
|
||||||
y16 int
|
y16 int
|
||||||
vy16 int
|
vy16 int
|
||||||
|
|
||||||
dir dir
|
dir dir
|
||||||
state state
|
|
||||||
count int
|
count int
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +142,7 @@ func (m *mascot) update(screen *ebiten.Image) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
img := gopher1
|
img := gopher1
|
||||||
if m.state == walking {
|
if m.y16 == 0 {
|
||||||
switch (m.count / 3) % 4 {
|
switch (m.count / 3) % 4 {
|
||||||
case 0:
|
case 0:
|
||||||
img = gopher1
|
img = gopher1
|
||||||
|
Loading…
Reference in New Issue
Block a user