feat: GetChildren slotName argument

This commit is contained in:
Qwreey 2023-04-12 01:09:03 +09:00
parent a54bdc61fe
commit b6c4e9a650
No known key found for this signature in database
GPG key ID: 01D9B192033CF43F
2 changed files with 18 additions and 7 deletions

View file

@ -5,6 +5,9 @@ types 모듈이 삭제되며 init.lua 에 통합됨
이제 extend 에 대해서 Init(self) self 안에 props 기능이 내장되어있음
TODO: slot 기능 구현
spring 구현
TODO: !ChildRemoved 구현
TODO: spring 구현
TODO: !ChildRemoved 구현
TODO: AdvancedTween 을 submodule 로 변경

View file

@ -167,7 +167,8 @@ function module.init(shared)
local setValue,tween = value:CalcWithNewValue(item,newValue,key)
if tween then
if not advancedTween then
return warn "[QUAD] module 'AdvancedTween' needs to be loaded for tween properties but it is not found on 'src.libs'. you should adding that to src.libs directory"
warn "[QUAD] Failed to execute register handler function. (Real Instance was not updated)"
return warn "[QUAD] module 'AdvancedTween' needs to be loaded for tween properties but it is not found on 'src.libs'. you should adding that to src.libs directory.\nPossible reason : Cloned repository without recursive option. => 'git submodule init ; git submodule update' to get submodules"
end
-- local ended, onStepped
-- if tween.Ended then
@ -445,11 +446,18 @@ function module.init(shared)
thisSignal:Fire(value)
end
function this:GetChildren()
local children = rawget(self,"__child")
if not children then
return {}
function this:GetChildren(slotName)
if slotName then
local slot = rawget(slotName,"__slot")
if not slot then return {} end
local newSlot = {}
for _,v in pairs(slot) do
insert(newSlot,v)
end
return slot
end
local children = rawget(self,"__child")
if not children then return {} end
local newChildren = {}
for _,v in pairs(children) do
insert(newChildren,v)