Documentation ¶
Index ¶
Constants ¶
View Source
const ( Inactive riserState = iota IdlingUp MovingUp MovingLeft MovingRight GettingCarried )
View Source
const ( // SmallRiserWidth is the hitbox width of the riser. // Actual width is 16 (one extra pixel to left and right). SmallRiserWidth = 14 // SmallRiserHeight is the hitbox height of the riser. // Actual height is 16 (one extra pixel to left and right). SmallRiserHeight = 14 // SmallRiserOffsetDX is the riser's render offset. SmallRiserOffsetDX = -1 // SmallRiserOffsetDY is the riser's render offset. SmallRiserOffsetDY = -1 // LargeRiserWidth is the hitbox width of the riser. // Actual width is 16 (one extra pixel to left and right). LargeRiserWidth = 30 // LargeRiserHeight is the hitbox height of the riser. // Actual height is 32 (one extra pixel to left and right). LargeRiserHeight = 14 // LargeRiserOffsetDX is the riser's render offset. LargeRiserOffsetDX = -1 // LargeRiserOffsetDY is the riser's render offset. LargeRiserOffsetDY = -1 // RiserBorderPixels is the riser's border size. RiserBorderPixels = 1 // CarriedSmallRiserWidth is the hitbox width of a riser being carried. CarriedSmallRiserWidth = 8 // CarriedSmallRiserHeight is the hitbox height of a riser being carried. CarriedSmallRiserHeight = 8 // CarriedLargeRiserWidth is the hitbox width of a riser being carried. CarriedLargeRiserWidth = 24 // CarriedLargeRiserHeight is the hitbox height of a riser being carried. CarriedLargeRiserHeight = 8 // IdleSpeed is the speed the riser moves upwards when not used. IdleSpeed = 15 * constants.SubPixelScale / engine.GameTPS // UpSpeed is the speed the riser moves upwards when the player is standing on it. UpSpeed = 60 * constants.SubPixelScale / engine.GameTPS // SideSpeed is the speed of the riser when pushed away. SideSpeed = 60 * constants.SubPixelScale / engine.GameTPS // FadeFrames is how many frames risers take to fade in or out. FadeFrames = 16 // FollowFactor is how fast a riser should follow the player per second. FollowFactor = 24.0 // FollowMaxDistance is the max distance allowed while following the player. // Hardest part: Multi-Party Authorization. FollowMaxDistance = 24 // RepelSpeed is the speed at which risers repel each other until they no longer overlap. RepelSpeed = 15 * constants.SubPixelScale / engine.GameTPS )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Riser ¶
type Riser struct { mixins.Physics World *engine.World Entity *engine.Entity NormalSize m.Delta CarriedSize m.Delta State riserState Anim animation.State FadeFrame int PlayerOnGroundVec m.Delta // contains filtered or unexported fields }
func (*Riser) PreDespawn ¶
func (r *Riser) PreDespawn()
Click to show internal directories.
Click to hide internal directories.