Documentation ¶
Index ¶
- Constants
- type AI
- type Aiming
- type AmbientLight
- type Animation
- type AnimationStep
- type BoundingBox
- type Camera
- type Cleanup
- type Collision
- type Damage
- type Debug
- type Goal
- type Health
- type Light
- type Map
- type Motion
- type MotionControl
- type ParticleEmitter
- type Performance
- type Shaking
- type Shooting
- type Sprite
- type SpriteAnimation
- type Target
- type Text
- type Transform
- type Trigger
- type Velocitydeprecated
Constants ¶
View Source
const AIType = "AI"
View Source
const AimingType = "AIAiming"
View Source
const AmbientLightType = "ambientLight"
View Source
const AnimationType = "sprite"
View Source
const BoundingBoxType = "BoundingBox"
View Source
const CameraType = "Camera"
View Source
const CleanupType = "Cleanup"
View Source
const CollisionType = "Collision"
View Source
const DamageType = "Damage"
View Source
const DebugType = "Debug"
View Source
const GoalType = "Goal"
View Source
const HealthType = "Health"
View Source
const LightType = "light"
View Source
const MapType = "Map"
View Source
const MotionControlType = "MotionControl"
View Source
const MotionType = "Motion"
View Source
const ParticleEmitterType = "particleEmitter"
View Source
const PerformanceType = "Performance"
View Source
const ShakingType = "Shaking"
View Source
const ShootingType = "Shooting"
View Source
const SpriteAnimationType = "spriteAnimation"
View Source
const SpriteType = "sprite"
View Source
const TargetType = "Target"
View Source
const TextType = "text"
View Source
const TransformType = "transform"
View Source
const TriggerType = "Trigger"
View Source
const VelocityType = "velocity"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aiming ¶
type Aiming struct {
TargetGroup int
}
func (Aiming) Type ¶
func (Aiming) Type() ecs.ComponentType
type AmbientLight ¶
func (AmbientLight) Type ¶
func (s AmbientLight) Type() ecs.ComponentType
type Animation ¶
type Animation struct { CurrentSprite *ebiten.Image ZIndex int Steps []AnimationStep Repeat bool CurrentTime time.Time }
func (Animation) Type ¶
func (s Animation) Type() ecs.ComponentType
type AnimationStep ¶
type BoundingBox ¶
BoundingBox, component for collision detection
func (BoundingBox) Type ¶
func (t BoundingBox) Type() ecs.ComponentType
type Camera ¶
type Camera struct { CameraMode camera.CameraMode Zoom float64 }
Camera is a component to control the camera
func (Camera) Type ¶
func (t Camera) Type() ecs.ComponentType
type Cleanup ¶
type Cleanup struct { }
Cleanup, empty component filtering
func (Cleanup) Type ¶
func (t Cleanup) Type() ecs.ComponentType
type Collision ¶
Collision, omponent for filtering collision
func (Collision) Type ¶
func (t Collision) Type() ecs.ComponentType
type Damage ¶
type Damage struct {
Value int
}
func (Damage) Type ¶
func (t Damage) Type() ecs.ComponentType
type Health ¶
type Health struct {
Value int
}
func (Health) Type ¶
func (t Health) Type() ecs.ComponentType
type Motion ¶
Motion stores the current velocity as well as angular velocity
func (Motion) Type ¶
func (s Motion) Type() ecs.ComponentType
type MotionControl ¶
type MotionControl struct { KeyForward ebiten.Key KeyBackward ebiten.Key KeyRight ebiten.Key KeyLeft ebiten.Key AccelerationRate float64 RotationRate float64 }
MotionControl contains the keymapping and other settings related to motion
func NewMotionControl ¶
func NewMotionControl() *MotionControl
func (*MotionControl) Accelerate ¶
func (t *MotionControl) Accelerate()
func (MotionControl) Type ¶
func (t MotionControl) Type() ecs.ComponentType
type ParticleEmitter ¶
type ParticleEmitter struct { Color color.Color Position_min float64 Position_max float64 Velocity_min float64 Velocity_max float64 Lifetime_min int Lifetime_max int Spawn_interval time.Duration Last_emitted time.Time Velocity float64 Direction_min int Direction_max int }
Text holds all information needed to render text
func (ParticleEmitter) Type ¶
func (t ParticleEmitter) Type() ecs.ComponentType
type Performance ¶
type Performance struct { ShowFPS bool ShowTPS bool ShowEntityCount bool ShowGraph bool HistoryLength int PastFPS []float64 }
Performance
func (Performance) Type ¶
func (t Performance) Type() ecs.ComponentType
type Shaking ¶
type Shaking struct { }
Shaking, empty component for filtering shakables
func (Shaking) Type ¶
func (t Shaking) Type() ecs.ComponentType
type SpriteAnimation ¶
type SpriteAnimation struct { Idx int Duration time.Duration Images []*ebiten.Image LastUpdate time.Time }
func (SpriteAnimation) Type ¶
func (s SpriteAnimation) Type() ecs.ComponentType
type Target ¶
type Target struct {
GroupId int
}
func (Target) Type ¶
func (Target) Type() ecs.ComponentType
type Text ¶
Text holds all information needed to render text
func (Text) Type ¶
func (t Text) Type() ecs.ComponentType
type Transform ¶
type Transform struct { Point vector.Vec2d Scale float64 Rotation float64 Parent *Transform OffsetX float64 OffsetY float64 Children []*Transform }
Transform holds all information needed to position the entity in the world
func (Transform) Type ¶
func (t Transform) Type() ecs.ComponentType
type Trigger ¶
type Trigger struct {
Action func(e *ecs.Entity, em *ecs.EntityManager)
}
Trigger, empty component filtering
func (Trigger) Type ¶
func (t Trigger) Type() ecs.ComponentType
type Velocity
deprecated
Deprecated: please use the Motion component instead.
func (*Velocity) IncreaseInertia ¶
func (v *Velocity) IncreaseInertia()
func (*Velocity) ResetInertia ¶
func (v *Velocity) ResetInertia()
func (Velocity) Type ¶
func (Velocity) Type() ecs.ComponentType
Source Files ¶
- ai.go
- aiming.go
- ambientLight.go
- animation.go
- boundingBox.go
- camera.go
- cleanup.go
- collision.go
- damage.go
- debug.go
- goal.go
- health.go
- light.go
- map.go
- motion.go
- motionControl.go
- particleEmitter.go
- performance.go
- shaking.go
- shooting.go
- sprite.go
- spriteAnimation.go
- target.go
- text.go
- transform.go
- trigger.go
- velocity.go
Click to show internal directories.
Click to hide internal directories.