forked from Noofbiz/engoBox2dSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.go
47 lines (39 loc) · 1.04 KB
/
interfaces.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
package engoBox2dSystem
import "engo.io/engo/common"
// GetBox2dComponent gets the *Box2dComponent from anything with a one, so they can implement
// the interfaces and AddByInterface can work
func (b *Box2dComponent) GetBox2dComponent() *Box2dComponent {
return b
}
// GetMouseComponent gets the *MouseComponent
func (m *MouseComponent) GetMouseComponent() *MouseComponent {
return m
}
// Box2dFace is an interface for the Box2dComponent
type Box2dFace interface {
GetBox2dComponent() *Box2dComponent
}
// MouseFace is an interface for the MouseComponent
type MouseFace interface {
GetMouseComponent() *MouseComponent
}
// Collisionable is for the CollisionSystem's AddByInterface
type Collisionable interface {
common.BasicFace
common.SpaceFace
Box2dFace
}
// Mouseable is for he MouseSystem's AddByInterface
type Mouseable interface {
common.BasicFace
MouseFace
common.SpaceFace
common.RenderFace
Box2dFace
}
// Physicsable is for the PhysicsSystem's AddByInterface
type Physicsable interface {
common.BasicFace
common.SpaceFace
Box2dFace
}