-
Notifications
You must be signed in to change notification settings - Fork 0
/
zinc_LocalScale2.go
executable file
·126 lines (105 loc) · 2.85 KB
/
zinc_LocalScale2.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Package zinckit ...
// Generated by the zinc tool. DO NOT EDIT!
// Source: zinc_LocalScale2
package zinckit
import (
"github.com/SirMetathyst/zinc"
)
// LocalScale2Key ...
const LocalScale2Key uint = 156111880
// LocalScale2Data ...
type LocalScale2Data struct {
X float32
Y float32
}
// LocalScale2Component ...
type LocalScale2Component struct {
ctx zinc.CTX
data map[zinc.EntityID]LocalScale2Data
}
// NewLocalScale2Component ...
func NewLocalScale2Component() *LocalScale2Component {
return &LocalScale2Component{
data: make(map[zinc.EntityID]LocalScale2Data),
}
}
// SetContext ...
func (c *LocalScale2Component) SetContext(ctx zinc.CTX) {
if c.ctx == nil {
c.ctx = ctx
}
}
func init() {
x := NewLocalScale2Component()
ctx := zinc.Default().RegisterComponent(LocalScale2Key, x)
x.SetContext(ctx)
}
// DeleteEntity ...
func (c *LocalScale2Component) DeleteEntity(id zinc.EntityID) {
delete(c.data, id)
}
// HasEntity ...
func (c *LocalScale2Component) HasEntity(id zinc.EntityID) bool {
_, ok := c.data[id]
return ok
}
// SetLocalScale2 ...
func (c *LocalScale2Component) SetLocalScale2(id zinc.EntityID, localscale2 LocalScale2Data) {
if c.ctx.HasEntity(id) {
if c.HasEntity(id) {
c.data[id] = localscale2
c.ctx.ComponentUpdated(LocalScale2Key, id)
} else {
c.data[id] = localscale2
c.ctx.ComponentAdded(LocalScale2Key, id)
}
}
}
// LocalScale2 ...
func (c *LocalScale2Component) LocalScale2(id zinc.EntityID) LocalScale2Data {
return c.data[id]
}
// DeleteLocalScale2 ...
func (c *LocalScale2Component) DeleteLocalScale2(id zinc.EntityID) {
delete(c.data, id)
c.ctx.ComponentDeleted(LocalScale2Key, id)
}
// SetLocalScale2X ...
func SetLocalScale2X(e *zinc.EntityManager, id zinc.EntityID, localscale2 LocalScale2Data) {
v, _ := e.Component(LocalScale2Key)
c := v.(*LocalScale2Component)
c.SetLocalScale2(id, localscale2)
}
// SetLocalScale2 ...
func SetLocalScale2(id zinc.EntityID, localscale2 LocalScale2Data) {
SetLocalScale2X(zinc.Default(), id, localscale2)
}
// LocalScale2X ...
func LocalScale2X(e *zinc.EntityManager, id zinc.EntityID) LocalScale2Data {
v, _ := e.Component(LocalScale2Key)
c := v.(*LocalScale2Component)
return c.LocalScale2(id)
}
// LocalScale2 ...
func LocalScale2(id zinc.EntityID) LocalScale2Data {
return LocalScale2X(zinc.Default(), id)
}
// DeleteLocalScale2X ...
func DeleteLocalScale2X(e *zinc.EntityManager, id zinc.EntityID) {
v, _ := e.Component(LocalScale2Key)
c := v.(*LocalScale2Component)
c.DeleteLocalScale2(id)
}
// DeleteLocalScale2 ...
func DeleteLocalScale2(id zinc.EntityID) {
DeleteLocalScale2X(zinc.Default(), id)
}
// HasLocalScale2X ...
func HasLocalScale2X(e *zinc.EntityManager, id zinc.EntityID) bool {
v, _ := e.Component(LocalScale2Key)
return v.HasEntity(id)
}
// HasLocalScale2 ...
func HasLocalScale2(id zinc.EntityID) bool {
return HasLocalScale2X(zinc.Default(), id)
}