-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcomponents.go
More file actions
51 lines (46 loc) · 1.54 KB
/
components.go
File metadata and controls
51 lines (46 loc) · 1.54 KB
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
package kar
import (
"time"
)
type ItemID uint8
type Rotation float64
type Facing Vec
type Velocity Vec
type Position Vec
type MobileID int // Mobile character id
type PlatformType string
type Durability int
type AnimationIndex int // timing-related data for item animations.
type AnimationTick float64 // timing-related data for item animations.
type CollisionDelayer time.Duration
type Health struct {
Current int
Max int
}
type Controller struct {
Acceleration float64
AirSkiddingDecel float64
CurrentState string
FallingDamageTempPosY float64
Gravity float64
JumpBoost float64
JumpBoostMultiplier float64
JumpHoldTime float64
JumpPower float64
JumpReleaseTimer float64
JumpTimer float64
MaxFallSpeed float64
MaxRunSpeed float64
MaxWalkSpeed float64
MinSpeedThresForJumpBoostMultiplier float64
PreviousState string
RunAcceleration float64
RunDeceleration float64
ShortJumpVelocity float64
SkiddingFriction float64
SkiddingJumpEnabled bool
SpeedJumpFactor float64
WalkAcceleration float64
WalkDeceleration float64
}
func ptr[T any](v T) *T { return &v }