-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add TSX tag and Rust support for EffekNode. [skip CI]
- Loading branch information
Showing
24 changed files
with
1,274 additions
and
817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
local Node = require("Node").Type | ||
local Vec2 = require("Vec2").Type | ||
|
||
-- A class for playing Effekseer effects. | ||
local record EffekNode | ||
|
||
-- Inherits from `Node`. | ||
embed Node | ||
|
||
-- Plays an Effekseer effect. | ||
-- @param filename (string) The filename of the effect. | ||
-- @param pos (Vec2) [optional] The XY position to play the effect at. | ||
-- @param z (number) [optional] The Z position to play the effect at. | ||
-- @return (integer) The handle of the effect. | ||
play: function(self: EffekNode, filename: string, pos?: Vec2, z?: number): integer | ||
|
||
-- Stops an Effekseer effect. | ||
-- @param handle (integer) The handle of the effect. | ||
stop: function(self: EffekNode, handle: integer) | ||
end | ||
|
||
-- A class for creating EffekNode objects. | ||
local record EffekNodeClass | ||
type Type = EffekNode | ||
|
||
-- Creates a new EffekNode object. | ||
-- @return (EffekNode) The new EffekNode object. | ||
metamethod __call: function(self: EffekNodeClass): EffekNode | ||
end | ||
|
||
local effekNodeClass: EffekNodeClass | ||
return effekNodeClass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
local Node = require("Node").Type | ||
local Vec2 = require("Vec2").Type | ||
|
||
-- 用于播放 Effekseer 特效的类。 | ||
local record EffekNode | ||
|
||
-- 继承自`Node`. | ||
embed Node | ||
|
||
-- 播放一个 Effekseer 特效。 | ||
-- @param filename (string) 要播放的特效文件的路径。 | ||
-- @param pos (Vec2) [optional] 要播放特效的XY坐标位置。 | ||
-- @param z (number) [optional] 要播放特效的Z坐标位置。 | ||
-- @return (integer) 用于控制特效的句柄。 | ||
play: function(self: EffekNode, filename: string, pos?: Vec2, z?: number): integer | ||
|
||
-- 停止一个 Effekseer 特效。 | ||
-- @param handle (integer) 要停止的特效的句柄。 | ||
stop: function(self: EffekNode, handle: integer) | ||
end | ||
|
||
-- 用于创建 EffekNode 对象的类。 | ||
local record EffekNodeClass | ||
type Type = EffekNode | ||
|
||
-- 创建一个新的 EffekNode 对象。 | ||
-- @return (EffekNode) 新创建的 EffekNode 对象。 | ||
metamethod __call: function(self: EffekNodeClass): EffekNode | ||
end | ||
|
||
local effekNodeClass: EffekNodeClass | ||
return effekNodeClass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.