-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcomponents.go
83 lines (76 loc) · 2.06 KB
/
components.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package kar
import (
"image"
"time"
)
type ItemID struct {
ID uint8
}
type Velocity struct {
X, Y float64
}
type Position struct {
X, Y float64
}
type Rotation struct {
Angle float64
}
type Size struct {
W, H float64
}
type AI struct {
Name string
}
// AnimationIndex holds timing-related data for item animations.
// It tracks the current frame index for dropped item animations.
type AnimationIndex struct {
Index int
}
type CollisionDelayer struct {
Duration time.Duration
}
type Durability struct {
Durability int
}
type Facing struct {
Dir image.Point
}
type Health struct {
Current int
Max int
}
type Controller struct {
CurrentState string
PreviousState string
Gravity float64
JumpPower float64
MaxFallSpeed float64
MaxRunSpeed float64
MaxWalkSpeed float64
Acceleration float64
Deceleration float64
JumpHoldTime float64
JumpBoost float64
JumpTimer float64
MinSpeedThresForJumpBoostMultiplier float64
JumpBoostMultiplier float64
SpeedJumpFactor float64
ShortJumpVelocity float64
JumpReleaseTimer float64
WalkAcceleration float64
WalkDeceleration float64
RunAcceleration float64
RunDeceleration float64
HorizontalVelocity float64
FallingDamageTempPosY float64
IsOnFloor bool
IsSkidding bool
IsFalling bool
SkiddingJumpEnabled bool
IsBreakKeyPressed bool
IsAttackKeyJustPressed bool
IsJumpKeyPressed bool
IsJumpKeyJustPressed bool
IsRunKeyPressed bool
InputAxis image.Point
}