feature/slay-deck-controller #14

Merged
gahusb merged 8 commits from feature/slay-deck-controller into main 2026-06-09 13:39:17 +09:00
20 changed files with 3195 additions and 1948 deletions

View File

@@ -23,7 +23,6 @@
"MOD.Core.SpriteRendererComponent",
"MOD.Core.RigidbodyComponent",
"MOD.Core.MovementComponent",
"MOD.Core.AIChaseComponent",
"MOD.Core.StateComponent",
"MOD.Core.HitComponent",
"MOD.Core.DamageSkinSpawnerComponent",
@@ -150,4 +149,4 @@
"Children": []
}
}
}
}

View File

@@ -30,7 +30,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 1.0
"Value": 0
},
{
"TargetType": null,
@@ -39,7 +39,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 1.0
"Value": 0
},
{
"TargetType": null,
@@ -48,7 +48,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 1.0
"Value": 0
},
{
"TargetType": null,
@@ -57,7 +57,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 1.0
"Value": 1
},
{
"TargetType": null,
@@ -118,7 +118,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 0.0
"Value": 0
},
{
"TargetType": null,
@@ -129,8 +129,8 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"y": 0.0
"x": 0,
"y": 0
}
},
{
@@ -185,7 +185,7 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"x": 0,
"y": 0.35
}
},
@@ -198,7 +198,7 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"x": 0,
"y": 0.35
}
},
@@ -218,7 +218,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 500.0
"Value": 500
},
{
"TargetType": "script.PlayerHit",
@@ -254,7 +254,7 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"x": 0,
"y": 0.35
}
},
@@ -265,7 +265,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 1.0
"Value": 0
},
{
"TargetType": "MOD.Core.MovementComponent",
@@ -274,7 +274,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 1.0
"Value": 0
},
{
"TargetType": "MOD.Core.PlayerComponent",
@@ -302,4 +302,4 @@
"Children": []
}
}
}
}

View File

@@ -23,7 +23,6 @@
"MOD.Core.SpriteRendererComponent",
"MOD.Core.RigidbodyComponent",
"MOD.Core.MovementComponent",
"MOD.Core.AIWanderComponent",
"MOD.Core.StateComponent",
"MOD.Core.HitComponent",
"MOD.Core.DamageSkinSpawnerComponent",
@@ -141,4 +140,4 @@
"Children": []
}
}
}
}

View File

@@ -23,7 +23,6 @@
"MOD.Core.SpriteRendererComponent",
"MOD.Core.RigidbodyComponent",
"MOD.Core.MovementComponent",
"MOD.Core.AIWanderComponent",
"MOD.Core.StateComponent",
"MOD.Core.HitComponent",
"MOD.Core.DamageSkinSpawnerComponent",
@@ -57,10 +56,10 @@
},
"Value": {
"$type": "MOD.Core.MODQuaternion, MOD.Core",
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 1.0
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
@@ -186,8 +185,8 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"y": 0.0
"x": 0,
"y": 0
}
},
{
@@ -199,8 +198,8 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"y": 0.0
"x": 0,
"y": 0
}
},
{
@@ -219,7 +218,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 1.0
"Value": 0
},
{
"TargetType": "MOD.Core.MovementComponent",
@@ -228,7 +227,7 @@
"$type": "MODNativeType",
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": 0.0
"Value": 0
},
{
"TargetType": "MOD.Core.MovementComponent",
@@ -239,24 +238,6 @@
},
"Value": true
},
{
"TargetType": "MOD.Core.AIWanderComponent",
"Name": "IsLegacy",
"ValueType": {
"$type": "MODNativeType",
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": false
},
{
"TargetType": "MOD.Core.AIWanderComponent",
"Name": "Enable",
"ValueType": {
"$type": "MODNativeType",
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
},
"Value": true
},
{
"TargetType": "MOD.Core.StateComponent",
"Name": "IsLegacy",
@@ -376,8 +357,8 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"y": 0.0
"x": 0,
"y": 0
}
},
{
@@ -389,8 +370,8 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"y": 0.0
"x": 0,
"y": 0
}
},
{
@@ -402,8 +383,8 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"y": 0.0
"x": 0,
"y": 0
}
},
{
@@ -424,8 +405,8 @@
},
"Value": {
"$type": "MOD.Core.MODVector2, MOD.Core",
"x": 0.0,
"y": 0.0
"x": 0,
"y": 0
}
},
{
@@ -460,4 +441,4 @@
"Children": []
}
}
}
}

View File

@@ -85,6 +85,13 @@
"Attributes": [],
"Name": "EndTurnHandler"
},
{
"Type": "any",
"DefaultValue": "nil",
"SyncDirection": 0,
"Attributes": [],
"Name": "NewGameHandler"
},
{
"Type": "any",
"DefaultValue": "nil",
@@ -299,12 +306,87 @@
"Name": null
},
"Arguments": [],
"Code": "self:StartRun()",
"Code": "self:ShowMainMenu()",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
"Name": "OnBeginPlay"
},
{
"Return": {
"Type": "void",
"DefaultValue": null,
"SyncDirection": 0,
"Attributes": [],
"Name": null
},
"Arguments": [],
"Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", true)\nself:BindMenuButtons()",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
"Name": "ShowMainMenu"
},
{
"Return": {
"Type": "void",
"DefaultValue": null,
"SyncDirection": 0,
"Attributes": [],
"Name": null
},
"Arguments": [],
"Code": "local buttonEntity = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/MainMenu/NewGameButton\")\nif buttonEntity == nil or buttonEntity.ButtonComponent == nil then\n\treturn\nend\nif self.NewGameHandler ~= nil then\n\tbuttonEntity:DisconnectEvent(ButtonClickEvent, self.NewGameHandler)\n\tself.NewGameHandler = nil\nend\nself.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, function() self:StartNewGame() end)",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
"Name": "BindMenuButtons"
},
{
"Return": {
"Type": "void",
"DefaultValue": null,
"SyncDirection": 0,
"Attributes": [],
"Name": null
},
"Arguments": [],
"Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", false)\nself:StartRun()",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
"Name": "StartNewGame"
},
{
"Return": {
"Type": "void",
"DefaultValue": null,
"SyncDirection": 0,
"Attributes": [],
"Name": null
},
"Arguments": [
{
"Type": "string",
"DefaultValue": null,
"SyncDirection": 0,
"Attributes": [],
"Name": "path"
},
{
"Type": "boolean",
"DefaultValue": null,
"SyncDirection": 0,
"Attributes": [],
"Name": "enabled"
}
],
"Code": "local e = _EntityService:GetEntityByPath(path)\nif e ~= nil then\n\te.Enable = enabled\nend",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
"Name": "SetEntityEnabled"
},
{
"Return": {
"Type": "void",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6479,7 +6479,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6626,7 +6627,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6651,4 +6653,4 @@
}
]
}
}
}

View File

@@ -6479,7 +6479,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6626,7 +6627,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6651,4 +6653,4 @@
}
]
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -6479,7 +6479,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6626,7 +6627,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6651,4 +6653,4 @@
}
]
}
}
}

View File

@@ -6479,7 +6479,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6626,7 +6627,8 @@
},
{
"@type": "MOD.Core.MovementComponent",
"Enable": true
"Enable": false,
"InputSpeed": 0
},
{
"@type": "script.Monster",
@@ -6651,4 +6653,4 @@
}
]
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,83 @@
import { readFileSync, writeFileSync } from 'node:fs';
const AI_COMPONENTS = new Set([
'MOD.Core.AIWanderComponent',
'MOD.Core.AIChaseComponent',
]);
const mapFiles = Array.from({ length: 11 }, (_, i) => `map/map${String(i + 1).padStart(2, '0')}.map`);
const modelFiles = [
'Global/MoveMonster.model',
'Global/ChaseMonster.model',
'RootDesk/MyDesk/Model_monster-43.model',
];
function isMonster(entity) {
return (entity.componentNames || '').includes('script.Monster');
}
function component(entity, type) {
return entity.jsonString['@components'].find((c) => c['@type'] === type);
}
function patchMonsterEntity(entity) {
const components = entity.jsonString['@components'];
entity.jsonString['@components'] = components.filter((c) => !AI_COMPONENTS.has(c['@type']));
entity.componentNames = entity.jsonString['@components'].map((c) => c['@type']).join(',');
const movement = component(entity, 'MOD.Core.MovementComponent');
if (movement) {
movement.Enable = false;
movement.InputSpeed = 0;
}
const rigidbody = component(entity, 'MOD.Core.RigidbodyComponent');
if (rigidbody) {
rigidbody.MoveVelocity = { x: 0, y: 0 };
rigidbody.RealMoveVelocity = { x: 0, y: 0 };
}
const transform = component(entity, 'MOD.Core.TransformComponent');
if (transform?.Scale) {
transform.Scale.x = Math.abs(transform.Scale.x || 1);
transform.Scale.y = Math.abs(transform.Scale.y || 1);
}
const stateAnimation = component(entity, 'MOD.Core.StateAnimationComponent');
const renderer = component(entity, 'MOD.Core.SpriteRendererComponent');
const stand = stateAnimation?.ActionSheet?.stand;
if (renderer && stand) {
renderer.SpriteRUID = stand;
}
}
function patchMap(file) {
const data = JSON.parse(readFileSync(file, 'utf8'));
for (const entity of data.ContentProto.Entities.filter(isMonster)) {
patchMonsterEntity(entity);
}
writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
}
function patchModel(file) {
const data = JSON.parse(readFileSync(file, 'utf8'));
const json = data.ContentProto.Json;
json.Components = (json.Components || []).filter((name) => !AI_COMPONENTS.has(name));
json.Values = (json.Values || []).filter((value) => !AI_COMPONENTS.has(value.TargetType));
for (const value of json.Values) {
if (value.TargetType === 'MOD.Core.MovementComponent' && value.Name === 'InputSpeed') {
value.Value = 0;
}
}
writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
}
for (const file of mapFiles) {
patchMap(file);
}
for (const file of modelFiles) {
patchModel(file);
}
console.log('Turn-combat monster movement disabled.');

View File

@@ -0,0 +1,20 @@
import { readFileSync, writeFileSync } from 'node:fs';
const file = 'Global/DefaultPlayer.model';
const data = JSON.parse(readFileSync(file, 'utf8'));
const values = data.ContentProto.Json.Values || [];
for (const value of values) {
if (value.TargetType === null && ['speed', 'jumpForce', 'walkAcceleration'].includes(value.Name)) {
value.Value = 0;
}
if (value.TargetType === 'MOD.Core.MovementComponent' && ['InputSpeed', 'JumpForce'].includes(value.Name)) {
value.Value = 0;
}
if (value.TargetType === 'MOD.Core.RigidbodyComponent' && ['MoveVelocity', 'RealMoveVelocity'].includes(value.Name)) {
value.Value = { x: 0, y: 0 };
}
}
writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`, 'utf8');
console.log('Turn-combat player movement disabled.');

View File

@@ -103,7 +103,7 @@ const ALIGN_BOTTOM_CENTER = 6;
function guid(prefix, n) {
// 유효한 8-4-4-4-12 hex GUID 생성. prefix는 충돌 방지용 네임스페이스 바이트로 매핑.
const ns = prefix === 'hud' ? 0xd0 : prefix === 'dck' ? 0xca : prefix === 'cmb' ? 0xcb : prefix === 'rwd' ? 0xcc : prefix === 'map' ? 0xcd : prefix === 'shp' ? 0xce : prefix === 'rst' ? 0xcf : 0xfe;
const ns = prefix === 'hud' ? 0xd0 : prefix === 'dck' ? 0xca : prefix === 'cmb' ? 0xcb : prefix === 'rwd' ? 0xcc : prefix === 'map' ? 0xcd : prefix === 'shp' ? 0xce : prefix === 'rst' ? 0xcf : prefix === 'menu' ? 0xe0 : 0xfe;
const v = (ns * 0x100000 + n) >>> 0;
return `${v.toString(16).padStart(8, '0')}-0000-4000-8000-${v.toString(16).padStart(12, '0')}`;
}
@@ -169,7 +169,7 @@ function sprite({ dataId = '', color = TRANSPARENT, type = 1, raycast = false })
};
}
function button() {
function button({ enabled = true } = {}) {
return {
'@type': 'MOD.Core.ButtonComponent',
Colors: {
@@ -190,7 +190,7 @@ function button() {
KeyCode: 0,
OverrideSorting: false,
Transition: 1,
Enable: true,
Enable: enabled,
};
}
@@ -255,7 +255,7 @@ function entity({ id, path, modelId, entryId, componentNames, components, displa
function upsertUi() {
const ui = JSON.parse(readFileSync(UI_FILE, 'utf8'));
const E = ui.ContentProto.Entities;
ui.ContentProto.Entities = E.filter((e) => !e.path.startsWith('/ui/DefaultGroup/DeckHud') && !e.path.startsWith('/ui/DefaultGroup/CombatHud') && !e.path.startsWith('/ui/DefaultGroup/RewardHud') && !e.path.startsWith('/ui/DefaultGroup/MapHud') && !e.path.startsWith('/ui/DefaultGroup/ShopHud') && !e.path.startsWith('/ui/DefaultGroup/RestHud'));
ui.ContentProto.Entities = E.filter((e) => !e.path.startsWith('/ui/DefaultGroup/DeckHud') && !e.path.startsWith('/ui/DefaultGroup/CombatHud') && !e.path.startsWith('/ui/DefaultGroup/RewardHud') && !e.path.startsWith('/ui/DefaultGroup/MapHud') && !e.path.startsWith('/ui/DefaultGroup/ShopHud') && !e.path.startsWith('/ui/DefaultGroup/RestHud') && !e.path.startsWith('/ui/DefaultGroup/MainMenu'));
const byPath = new Map(ui.ContentProto.Entities.map((e) => [e.path, e]));
@@ -876,6 +876,75 @@ function upsertUi() {
}));
ui.ContentProto.Entities.push(...rest);
const menu = [];
menu.push(entity({
id: guid('menu', 0),
path: '/ui/DefaultGroup/MainMenu',
modelId: 'uisprite',
entryId: 'UISprite',
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent',
displayOrder: 20,
components: [
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 1920, y: 1080 }, pos: { x: 0, y: 0 }, align: ALIGN_CENTER }),
sprite({ color: { r: 0.04, g: 0.05, b: 0.07, a: 0.96 }, type: 1, raycast: true }),
],
}));
menu.push(entity({
id: guid('menu', 1),
path: '/ui/DefaultGroup/MainMenu/Title',
modelId: 'uitext',
entryId: 'UIText',
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent',
displayOrder: 0,
components: [
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 720, y: 100 }, pos: { x: 0, y: 180 }, align: ALIGN_CENTER }),
sprite({ color: TRANSPARENT }),
text({ value: '슬레이 메이플', fontSize: 64, bold: true, color: GOLD, alignment: 0 }),
],
}));
menu.push(entity({
id: guid('menu', 2),
path: '/ui/DefaultGroup/MainMenu/Subtitle',
modelId: 'uitext',
entryId: 'UIText',
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent',
displayOrder: 1,
components: [
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 760, y: 48 }, pos: { x: 0, y: 104 }, align: ALIGN_CENTER }),
sprite({ color: TRANSPARENT }),
text({ value: '카드를 뽑고, 덱을 만들고, 첨탑을 오른다', fontSize: 24, color: { r: 0.82, g: 0.86, b: 0.9, a: 1 }, alignment: 0 }),
],
}));
menu.push(entity({
id: guid('menu', 3),
path: '/ui/DefaultGroup/MainMenu/NewGameButton',
modelId: 'uibutton',
entryId: 'UIButton',
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent',
displayOrder: 2,
components: [
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 260, y: 68 }, pos: { x: 0, y: -20 }, align: ALIGN_CENTER }),
sprite({ color: { r: 0.13, g: 0.15, b: 0.18, a: 1 }, type: 1, raycast: true }),
button(),
text({ value: '새 게임', fontSize: 30, bold: true, color: GOLD, alignment: 0 }),
],
}));
menu.push(entity({
id: guid('menu', 4),
path: '/ui/DefaultGroup/MainMenu/ContinueButton',
modelId: 'uibutton',
entryId: 'UIButton',
componentNames: 'MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent',
displayOrder: 3,
components: [
transform({ parentW: 1920, parentH: 1080, anchor: { x: 0.5, y: 0.5 }, pivot: { x: 0.5, y: 0.5 }, size: { x: 260, y: 58 }, pos: { x: 0, y: -100 }, align: ALIGN_CENTER }),
sprite({ color: { r: 0.1, g: 0.11, b: 0.13, a: 0.78 }, type: 1, raycast: false }),
button({ enabled: false }),
text({ value: '이어하기', fontSize: 24, bold: true, color: { r: 0.55, g: 0.58, b: 0.62, a: 1 }, alignment: 0 }),
],
}));
ui.ContentProto.Entities.push(...menu);
JSON.parse(JSON.stringify(ui));
writeFileSync(UI_FILE, JSON.stringify(ui, null, 2), 'utf8');
}
@@ -945,6 +1014,7 @@ function writeCodeblocks() {
prop('number', 'Turn', '0'),
prop('number', 'TweenEventId', '0'),
prop('any', 'EndTurnHandler'),
prop('any', 'NewGameHandler'),
prop('any', 'Cards'),
prop('number', 'PlayerHp', '0'),
prop('number', 'PlayerMaxHp', '80'),
@@ -975,7 +1045,27 @@ function writeCodeblocks() {
prop('string', 'ShopRelic', '""'),
prop('boolean', 'ShopRelicBought', 'false'),
], [
method('OnBeginPlay', `self:StartRun()`),
method('OnBeginPlay', `self:ShowMainMenu()`),
method('ShowMainMenu', `self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", true)
self:BindMenuButtons()`),
method('BindMenuButtons', `local buttonEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/MainMenu/NewGameButton")
if buttonEntity == nil or buttonEntity.ButtonComponent == nil then
return
end
if self.NewGameHandler ~= nil then
buttonEntity:DisconnectEvent(ButtonClickEvent, self.NewGameHandler)
self.NewGameHandler = nil
end
self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, function() self:StartNewGame() end)`),
method('StartNewGame', `self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", false)
self:StartRun()`),
method('SetEntityEnabled', `local e = _EntityService:GetEntityByPath(path)
if e ~= nil then
e.Enable = enabled
end`, [
{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' },
{ Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'enabled' },
]),
method('StartRun', `self.PlayerMaxHp = 80
self.PlayerHp = self.PlayerMaxHp
self.Gold = 0

View File

@@ -19535,6 +19535,993 @@
],
"@version": 1
}
},
{
"id": "0e000000-0000-4000-8000-00000e000000",
"path": "/ui/DefaultGroup/MainMenu",
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent",
"jsonString": {
"name": "MainMenu",
"path": "/ui/DefaultGroup/MainMenu",
"nameEditable": true,
"enable": true,
"visible": true,
"localize": true,
"displayOrder": 20,
"pathConstraints": "///",
"revision": 1,
"origin": {
"type": "Model",
"entry_id": "UISprite",
"sub_entity_id": null,
"root_entity_id": null,
"replaced_model_id": null
},
"modelId": "uisprite",
"@components": [
{
"@type": "MOD.Core.UITransformComponent",
"ActivePlatform": 255,
"AlignmentOption": 0,
"AnchorsMax": {
"x": 0.5,
"y": 0.5
},
"AnchorsMin": {
"x": 0.5,
"y": 0.5
},
"MobileOnly": false,
"OffsetMax": {
"x": 960,
"y": 540
},
"OffsetMin": {
"x": -960,
"y": -540
},
"Pivot": {
"x": 0.5,
"y": 0.5
},
"RectSize": {
"x": 1920,
"y": 1080
},
"UIMode": 1,
"UIScale": {
"x": 1,
"y": 1,
"z": 1
},
"UIVersion": 2,
"anchoredPosition": {
"x": 0,
"y": 0
},
"Position": {
"x": 0,
"y": 0,
"z": 0
},
"QuaternionRotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"Scale": {
"x": 1,
"y": 1,
"z": 1
},
"Enable": true
},
{
"@type": "MOD.Core.SpriteGUIRendererComponent",
"AnimClipPlayType": 0,
"EndFrameIndex": 2147483647,
"ImageRUID": {
"DataId": ""
},
"LocalPosition": {
"x": 0,
"y": 0
},
"LocalScale": {
"x": 1,
"y": 1
},
"OverrideSorting": false,
"PlayRate": 1,
"PreserveSprite": 0,
"StartFrameIndex": 0,
"Color": {
"r": 0.04,
"g": 0.05,
"b": 0.07,
"a": 0.96
},
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"FillAmount": 1,
"FillCenter": true,
"FillClockWise": true,
"FillMethod": 0,
"FillOrigin": 0,
"FlipX": false,
"FlipY": false,
"FrameColumn": 1,
"FrameRate": 0,
"FrameRow": 1,
"Outline": false,
"OutlineColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
},
"OutlineWidth": 3,
"RaycastTarget": true,
"Type": 1,
"Enable": true
}
],
"@version": 1
}
},
{
"id": "0e000001-0000-4000-8000-00000e000001",
"path": "/ui/DefaultGroup/MainMenu/Title",
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent",
"jsonString": {
"name": "Title",
"path": "/ui/DefaultGroup/MainMenu/Title",
"nameEditable": true,
"enable": true,
"visible": true,
"localize": true,
"displayOrder": 0,
"pathConstraints": "////",
"revision": 1,
"origin": {
"type": "Model",
"entry_id": "UIText",
"sub_entity_id": null,
"root_entity_id": null,
"replaced_model_id": null
},
"modelId": "uitext",
"@components": [
{
"@type": "MOD.Core.UITransformComponent",
"ActivePlatform": 255,
"AlignmentOption": 0,
"AnchorsMax": {
"x": 0.5,
"y": 0.5
},
"AnchorsMin": {
"x": 0.5,
"y": 0.5
},
"MobileOnly": false,
"OffsetMax": {
"x": 360,
"y": 230
},
"OffsetMin": {
"x": -360,
"y": 130
},
"Pivot": {
"x": 0.5,
"y": 0.5
},
"RectSize": {
"x": 720,
"y": 100
},
"UIMode": 1,
"UIScale": {
"x": 1,
"y": 1,
"z": 1
},
"UIVersion": 2,
"anchoredPosition": {
"x": 0,
"y": 180
},
"Position": {
"x": 0,
"y": 180,
"z": 0
},
"QuaternionRotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"Scale": {
"x": 1,
"y": 1,
"z": 1
},
"Enable": true
},
{
"@type": "MOD.Core.SpriteGUIRendererComponent",
"AnimClipPlayType": 0,
"EndFrameIndex": 2147483647,
"ImageRUID": {
"DataId": ""
},
"LocalPosition": {
"x": 0,
"y": 0
},
"LocalScale": {
"x": 1,
"y": 1
},
"OverrideSorting": false,
"PlayRate": 1,
"PreserveSprite": 0,
"StartFrameIndex": 0,
"Color": {
"r": 0,
"g": 0,
"b": 0,
"a": 0
},
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"FillAmount": 1,
"FillCenter": true,
"FillClockWise": true,
"FillMethod": 0,
"FillOrigin": 0,
"FlipX": false,
"FlipY": false,
"FrameColumn": 1,
"FrameRate": 0,
"FrameRow": 1,
"Outline": false,
"OutlineColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
},
"OutlineWidth": 3,
"RaycastTarget": false,
"Type": 1,
"Enable": true
},
{
"@type": "MOD.Core.TextComponent",
"Alignment": 0,
"Bold": true,
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"Font": 0,
"FontColor": {
"r": 0.94,
"g": 0.74,
"b": 0.26,
"a": 1
},
"FontSize": 64,
"MaxSize": 64,
"MinSize": 8,
"OutlineColor": {
"r": 0.08,
"g": 0.08,
"b": 0.08,
"a": 1
},
"OutlineDistance": {
"x": 1,
"y": -1
},
"OutlineWidth": 1,
"Overflow": 0,
"OverrideSorting": false,
"Padding": {
"left": 0,
"right": 0,
"top": 0,
"bottom": 0
},
"SizeFit": false,
"Text": "슬레이 메이플",
"UseOutLine": true,
"Enable": true
}
],
"@version": 1
}
},
{
"id": "0e000002-0000-4000-8000-00000e000002",
"path": "/ui/DefaultGroup/MainMenu/Subtitle",
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.TextComponent",
"jsonString": {
"name": "Subtitle",
"path": "/ui/DefaultGroup/MainMenu/Subtitle",
"nameEditable": true,
"enable": true,
"visible": true,
"localize": true,
"displayOrder": 1,
"pathConstraints": "////",
"revision": 1,
"origin": {
"type": "Model",
"entry_id": "UIText",
"sub_entity_id": null,
"root_entity_id": null,
"replaced_model_id": null
},
"modelId": "uitext",
"@components": [
{
"@type": "MOD.Core.UITransformComponent",
"ActivePlatform": 255,
"AlignmentOption": 0,
"AnchorsMax": {
"x": 0.5,
"y": 0.5
},
"AnchorsMin": {
"x": 0.5,
"y": 0.5
},
"MobileOnly": false,
"OffsetMax": {
"x": 380,
"y": 128
},
"OffsetMin": {
"x": -380,
"y": 80
},
"Pivot": {
"x": 0.5,
"y": 0.5
},
"RectSize": {
"x": 760,
"y": 48
},
"UIMode": 1,
"UIScale": {
"x": 1,
"y": 1,
"z": 1
},
"UIVersion": 2,
"anchoredPosition": {
"x": 0,
"y": 104
},
"Position": {
"x": 0,
"y": 104,
"z": 0
},
"QuaternionRotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"Scale": {
"x": 1,
"y": 1,
"z": 1
},
"Enable": true
},
{
"@type": "MOD.Core.SpriteGUIRendererComponent",
"AnimClipPlayType": 0,
"EndFrameIndex": 2147483647,
"ImageRUID": {
"DataId": ""
},
"LocalPosition": {
"x": 0,
"y": 0
},
"LocalScale": {
"x": 1,
"y": 1
},
"OverrideSorting": false,
"PlayRate": 1,
"PreserveSprite": 0,
"StartFrameIndex": 0,
"Color": {
"r": 0,
"g": 0,
"b": 0,
"a": 0
},
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"FillAmount": 1,
"FillCenter": true,
"FillClockWise": true,
"FillMethod": 0,
"FillOrigin": 0,
"FlipX": false,
"FlipY": false,
"FrameColumn": 1,
"FrameRate": 0,
"FrameRow": 1,
"Outline": false,
"OutlineColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
},
"OutlineWidth": 3,
"RaycastTarget": false,
"Type": 1,
"Enable": true
},
{
"@type": "MOD.Core.TextComponent",
"Alignment": 0,
"Bold": false,
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"Font": 0,
"FontColor": {
"r": 0.82,
"g": 0.86,
"b": 0.9,
"a": 1
},
"FontSize": 24,
"MaxSize": 24,
"MinSize": 8,
"OutlineColor": {
"r": 0.08,
"g": 0.08,
"b": 0.08,
"a": 1
},
"OutlineDistance": {
"x": 1,
"y": -1
},
"OutlineWidth": 1,
"Overflow": 0,
"OverrideSorting": false,
"Padding": {
"left": 0,
"right": 0,
"top": 0,
"bottom": 0
},
"SizeFit": false,
"Text": "카드를 뽑고, 덱을 만들고, 첨탑을 오른다",
"UseOutLine": true,
"Enable": true
}
],
"@version": 1
}
},
{
"id": "0e000003-0000-4000-8000-00000e000003",
"path": "/ui/DefaultGroup/MainMenu/NewGameButton",
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent",
"jsonString": {
"name": "NewGameButton",
"path": "/ui/DefaultGroup/MainMenu/NewGameButton",
"nameEditable": true,
"enable": true,
"visible": true,
"localize": true,
"displayOrder": 2,
"pathConstraints": "////",
"revision": 1,
"origin": {
"type": "Model",
"entry_id": "UIButton",
"sub_entity_id": null,
"root_entity_id": null,
"replaced_model_id": null
},
"modelId": "uibutton",
"@components": [
{
"@type": "MOD.Core.UITransformComponent",
"ActivePlatform": 255,
"AlignmentOption": 0,
"AnchorsMax": {
"x": 0.5,
"y": 0.5
},
"AnchorsMin": {
"x": 0.5,
"y": 0.5
},
"MobileOnly": false,
"OffsetMax": {
"x": 130,
"y": 14
},
"OffsetMin": {
"x": -130,
"y": -54
},
"Pivot": {
"x": 0.5,
"y": 0.5
},
"RectSize": {
"x": 260,
"y": 68
},
"UIMode": 1,
"UIScale": {
"x": 1,
"y": 1,
"z": 1
},
"UIVersion": 2,
"anchoredPosition": {
"x": 0,
"y": -20
},
"Position": {
"x": 0,
"y": -20,
"z": 0
},
"QuaternionRotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"Scale": {
"x": 1,
"y": 1,
"z": 1
},
"Enable": true
},
{
"@type": "MOD.Core.SpriteGUIRendererComponent",
"AnimClipPlayType": 0,
"EndFrameIndex": 2147483647,
"ImageRUID": {
"DataId": ""
},
"LocalPosition": {
"x": 0,
"y": 0
},
"LocalScale": {
"x": 1,
"y": 1
},
"OverrideSorting": false,
"PlayRate": 1,
"PreserveSprite": 0,
"StartFrameIndex": 0,
"Color": {
"r": 0.13,
"g": 0.15,
"b": 0.18,
"a": 1
},
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"FillAmount": 1,
"FillCenter": true,
"FillClockWise": true,
"FillMethod": 0,
"FillOrigin": 0,
"FlipX": false,
"FlipY": false,
"FrameColumn": 1,
"FrameRate": 0,
"FrameRow": 1,
"Outline": false,
"OutlineColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
},
"OutlineWidth": 3,
"RaycastTarget": true,
"Type": 1,
"Enable": true
},
{
"@type": "MOD.Core.ButtonComponent",
"Colors": {
"NormalColor": {
"r": 1,
"g": 1,
"b": 1,
"a": 1
},
"HighlightedColor": {
"r": 0.9607843,
"g": 0.9607843,
"b": 0.9607843,
"a": 1
},
"PressedColor": {
"r": 0.784313738,
"g": 0.784313738,
"b": 0.784313738,
"a": 1
},
"SelectedColor": {
"r": 0.9607843,
"g": 0.9607843,
"b": 0.9607843,
"a": 1
},
"DisabledColor": {
"r": 0.784313738,
"g": 0.784313738,
"b": 0.784313738,
"a": 0.5019608
},
"ColorMultiplier": 1,
"FadeDuration": 0.1
},
"ImageRUIDs": {
"HighlightedSprite": null,
"PressedSprite": null,
"SelectedSprite": null,
"DisabledSprite": null
},
"KeyCode": 0,
"OverrideSorting": false,
"Transition": 1,
"Enable": true
},
{
"@type": "MOD.Core.TextComponent",
"Alignment": 0,
"Bold": true,
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"Font": 0,
"FontColor": {
"r": 0.94,
"g": 0.74,
"b": 0.26,
"a": 1
},
"FontSize": 30,
"MaxSize": 30,
"MinSize": 8,
"OutlineColor": {
"r": 0.08,
"g": 0.08,
"b": 0.08,
"a": 1
},
"OutlineDistance": {
"x": 1,
"y": -1
},
"OutlineWidth": 1,
"Overflow": 0,
"OverrideSorting": false,
"Padding": {
"left": 0,
"right": 0,
"top": 0,
"bottom": 0
},
"SizeFit": false,
"Text": "새 게임",
"UseOutLine": true,
"Enable": true
}
],
"@version": 1
}
},
{
"id": "0e000004-0000-4000-8000-00000e000004",
"path": "/ui/DefaultGroup/MainMenu/ContinueButton",
"componentNames": "MOD.Core.UITransformComponent,MOD.Core.SpriteGUIRendererComponent,MOD.Core.ButtonComponent,MOD.Core.TextComponent",
"jsonString": {
"name": "ContinueButton",
"path": "/ui/DefaultGroup/MainMenu/ContinueButton",
"nameEditable": true,
"enable": true,
"visible": true,
"localize": true,
"displayOrder": 3,
"pathConstraints": "////",
"revision": 1,
"origin": {
"type": "Model",
"entry_id": "UIButton",
"sub_entity_id": null,
"root_entity_id": null,
"replaced_model_id": null
},
"modelId": "uibutton",
"@components": [
{
"@type": "MOD.Core.UITransformComponent",
"ActivePlatform": 255,
"AlignmentOption": 0,
"AnchorsMax": {
"x": 0.5,
"y": 0.5
},
"AnchorsMin": {
"x": 0.5,
"y": 0.5
},
"MobileOnly": false,
"OffsetMax": {
"x": 130,
"y": -71
},
"OffsetMin": {
"x": -130,
"y": -129
},
"Pivot": {
"x": 0.5,
"y": 0.5
},
"RectSize": {
"x": 260,
"y": 58
},
"UIMode": 1,
"UIScale": {
"x": 1,
"y": 1,
"z": 1
},
"UIVersion": 2,
"anchoredPosition": {
"x": 0,
"y": -100
},
"Position": {
"x": 0,
"y": -100,
"z": 0
},
"QuaternionRotation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"Scale": {
"x": 1,
"y": 1,
"z": 1
},
"Enable": true
},
{
"@type": "MOD.Core.SpriteGUIRendererComponent",
"AnimClipPlayType": 0,
"EndFrameIndex": 2147483647,
"ImageRUID": {
"DataId": ""
},
"LocalPosition": {
"x": 0,
"y": 0
},
"LocalScale": {
"x": 1,
"y": 1
},
"OverrideSorting": false,
"PlayRate": 1,
"PreserveSprite": 0,
"StartFrameIndex": 0,
"Color": {
"r": 0.1,
"g": 0.11,
"b": 0.13,
"a": 0.78
},
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"FillAmount": 1,
"FillCenter": true,
"FillClockWise": true,
"FillMethod": 0,
"FillOrigin": 0,
"FlipX": false,
"FlipY": false,
"FrameColumn": 1,
"FrameRate": 0,
"FrameRow": 1,
"Outline": false,
"OutlineColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
},
"OutlineWidth": 3,
"RaycastTarget": false,
"Type": 1,
"Enable": true
},
{
"@type": "MOD.Core.ButtonComponent",
"Colors": {
"NormalColor": {
"r": 1,
"g": 1,
"b": 1,
"a": 1
},
"HighlightedColor": {
"r": 0.9607843,
"g": 0.9607843,
"b": 0.9607843,
"a": 1
},
"PressedColor": {
"r": 0.784313738,
"g": 0.784313738,
"b": 0.784313738,
"a": 1
},
"SelectedColor": {
"r": 0.9607843,
"g": 0.9607843,
"b": 0.9607843,
"a": 1
},
"DisabledColor": {
"r": 0.784313738,
"g": 0.784313738,
"b": 0.784313738,
"a": 0.5019608
},
"ColorMultiplier": 1,
"FadeDuration": 0.1
},
"ImageRUIDs": {
"HighlightedSprite": null,
"PressedSprite": null,
"SelectedSprite": null,
"DisabledSprite": null
},
"KeyCode": 0,
"OverrideSorting": false,
"Transition": 1,
"Enable": false
},
{
"@type": "MOD.Core.TextComponent",
"Alignment": 0,
"Bold": true,
"DropShadow": false,
"DropShadowAngle": 30,
"DropShadowColor": {
"r": 0,
"g": 0,
"b": 0,
"a": 0.72
},
"DropShadowDistance": 32,
"Font": 0,
"FontColor": {
"r": 0.55,
"g": 0.58,
"b": 0.62,
"a": 1
},
"FontSize": 24,
"MaxSize": 24,
"MinSize": 8,
"OutlineColor": {
"r": 0.08,
"g": 0.08,
"b": 0.08,
"a": 1
},
"OutlineDistance": {
"x": 1,
"y": -1
},
"OutlineWidth": 1,
"Overflow": 0,
"OverrideSorting": false,
"Padding": {
"left": 0,
"right": 0,
"top": 0,
"bottom": 0
},
"SizeFit": false,
"Text": "이어하기",
"UseOutLine": true,
"Enable": true
}
],
"@version": 1
}
}
]
}