2023-12-23 00:09:07 +03:00
|
|
|
package main
|
|
|
|
|
2024-01-05 04:22:53 +03:00
|
|
|
import "vultras.su/core/gg"
|
2023-12-23 00:09:07 +03:00
|
|
|
|
|
|
|
type Rect struct {
|
|
|
|
gg.DrawableRectangle
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewRect() *Rect {
|
|
|
|
ret := &Rect{}
|
|
|
|
ret.Scale = gg.V(200, 400)
|
|
|
|
ret.Color = gg.Color{
|
|
|
|
gg.MaxColorV,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
gg.MaxColorV,
|
|
|
|
}
|
|
|
|
ret.Layer = RectL
|
2024-01-08 06:09:36 +03:00
|
|
|
ret.Visible = true
|
2024-01-16 04:11:42 +03:00
|
|
|
ret.Collidable = true
|
|
|
|
ret.Width = 100
|
|
|
|
ret.Height = 200
|
2023-12-23 00:09:07 +03:00
|
|
|
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Rect) Update(c *Context) {
|
|
|
|
//r.R += 0.3 * e.DT()
|
|
|
|
//r.Position = c.AbsCursorPosition()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Rect) Event(c *Context) {
|
|
|
|
}
|