diff options
author | chai <chaifix@163.com> | 2021-10-17 11:14:00 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-17 11:14:00 +0800 |
commit | d35db57d457132dd9d83fa2bd51491b148530655 (patch) | |
tree | b5a29675f091f268577b5991988c723f273b0bd1 /DefaultContent/Libraries/Framework/Core/Sprite.lua | |
parent | 7b0a6d1fe0117cf42a5776aaabda2db78599e5b8 (diff) |
*GUI
Diffstat (limited to 'DefaultContent/Libraries/Framework/Core/Sprite.lua')
-rw-r--r-- | DefaultContent/Libraries/Framework/Core/Sprite.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/DefaultContent/Libraries/Framework/Core/Sprite.lua b/DefaultContent/Libraries/Framework/Core/Sprite.lua new file mode 100644 index 0000000..47cb50d --- /dev/null +++ b/DefaultContent/Libraries/Framework/Core/Sprite.lua @@ -0,0 +1,21 @@ +-- 对Quad的封装,更能适合2D游戏开发 +local Sprite = {} + +Sprite.New = function(quad) + local spr = {} + spr.quad = Jin.Quad.New(quad) + spr.pivot = Jin.Vector2.New(0.5, 0) + spr.transform = Jin.Transform.New() + spr.depth = 0 + return spr +end + +Sprite.SetDepth = function(self, depth) + spr.depth = depth +end + +Sprite.SetTexture = function(self, tex, reset_quad) + +end + +Jin.Sprite = Sprite
\ No newline at end of file |