feat(map-camera): 게임 시작 시 플레이어 입력 차단·오른쪽 바라보기 + map01 몬스터 3마리 배치
MapCamera 스크립트(맵 진입 OnBeginPlay)가 카메라에 더해 플레이어도 셋업: - PlayerControllerComponent.LookDirectionX=1 (오른쪽 — 기본은 -1 왼쪽) - FixedLookAt=true (방향 고정) - Enable=false (키보드 입력 차단: 이동/점프/공격) - map01: 몬스터 3마리 배치(사용자 의도 변경 포함) - 메이커 Play 검증: LookDirectionX=1·Enable=false 확인, 오른쪽키 입력→플레이어 미이동(입력 차단), 아바타 정상, 카메라 zoom90·offset(1.5,-1) 유지 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self.CamTries = 0\nlocal eventId = 0\nlocal function apply()\n\tself.CamTries = self.CamTries + 1\n\tlocal cam = nil\n\tlocal lp = _UserService.LocalPlayer\n\tif lp ~= nil then\n\t\tcam = lp.CameraComponent\n\tend\n\tif cam == nil then\n\t\tcam = _CameraService:GetCurrentCameraComponent()\n\tend\n\tif cam ~= nil then\n\t\tcam.ZoomRatio = 90\n\t\tcam.ScreenOffset = Vector2(0.5, 0.655)\n\t\tcam.ConfineCameraArea = true\n\t\tcam.CameraOffset = Vector2(1.5, -1)\n\t\t_TimerService:ClearTimer(eventId)\n\telseif self.CamTries > 30 then\n\t\t_TimerService:ClearTimer(eventId)\n\tend\nend\neventId = _TimerService:SetTimerRepeat(apply, 0.1)",
|
||||
"Code": "self.CamTries = 0\nlocal eventId = 0\nlocal function apply()\n\tself.CamTries = self.CamTries + 1\n\tlocal cam = nil\n\tlocal lp = _UserService.LocalPlayer\n\tif lp ~= nil then\n\t\tcam = lp.CameraComponent\n\tend\n\tif cam == nil then\n\t\tcam = _CameraService:GetCurrentCameraComponent()\n\tend\n\tif cam ~= nil then\n\t\tcam.ZoomRatio = 90\n\t\tcam.ScreenOffset = Vector2(0.5, 0.655)\n\t\tcam.ConfineCameraArea = true\n\t\tcam.CameraOffset = Vector2(1.5, -1)\n\tend\n\tlocal pc = nil\n\tif lp ~= nil then\n\t\tpc = lp.PlayerControllerComponent\n\t\tif pc ~= nil then\n\t\t\tpc.LookDirectionX = 1\n\t\t\tpc.FixedLookAt = true\n\t\t\tpc.Enable = false\n\t\tend\n\tend\n\tif cam ~= nil and pc ~= nil then\n\t\t_TimerService:ClearTimer(eventId)\n\telseif self.CamTries > 30 then\n\t\t_TimerService:ClearTimer(eventId)\n\tend\nend\neventId = _TimerService:SetTimerRepeat(apply, 0.1)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
|
||||
148
map/map01.map
148
map/map01.map
@@ -6483,8 +6483,8 @@
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.MovementComponent",
|
||||
"Enable": false,
|
||||
"InputSpeed": 0
|
||||
"InputSpeed": 0,
|
||||
"Enable": false
|
||||
},
|
||||
{
|
||||
"@type": "script.Monster",
|
||||
@@ -6533,7 +6533,7 @@
|
||||
{
|
||||
"@type": "MOD.Core.TransformComponent",
|
||||
"Position": {
|
||||
"x": 6.6,
|
||||
"x": 2.08546019,
|
||||
"y": 0.03499998,
|
||||
"z": 999.999
|
||||
},
|
||||
@@ -6805,148 +6805,6 @@
|
||||
],
|
||||
"@version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a6d1d4be-0b0a-4581-b2a8-a3cddecb44bd",
|
||||
"path": "/maps/map01/monster-43",
|
||||
"componentNames": "MOD.Core.TransformComponent,MOD.Core.StateAnimationComponent,MOD.Core.SpriteRendererComponent,MOD.Core.RigidbodyComponent,MOD.Core.MovementComponent,MOD.Core.StateComponent,MOD.Core.HitComponent,MOD.Core.DamageSkinSpawnerComponent,script.Monster,script.MonsterAttack,MOD.Core.KinematicbodyComponent,MOD.Core.SideviewbodyComponent",
|
||||
"jsonString": {
|
||||
"name": "monster-43",
|
||||
"path": "/maps/map01/monster-43",
|
||||
"nameEditable": true,
|
||||
"enable": true,
|
||||
"visible": true,
|
||||
"localize": false,
|
||||
"displayOrder": 7,
|
||||
"pathConstraints": "///",
|
||||
"revision": 1,
|
||||
"origin": {
|
||||
"type": "Model",
|
||||
"entry_id": "MoveMonster",
|
||||
"sub_entity_id": null,
|
||||
"root_entity_id": "a6d1d4be-0b0a-4581-b2a8-a3cddecb44bd",
|
||||
"replaced_model_id": null
|
||||
},
|
||||
"modelId": "movemonster",
|
||||
"@components": [
|
||||
{
|
||||
"@type": "MOD.Core.TransformComponent",
|
||||
"Position": {
|
||||
"x": 2.4,
|
||||
"y": 1.27528822,
|
||||
"z": 999.999
|
||||
},
|
||||
"QuaternionRotation": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.StateAnimationComponent",
|
||||
"ActionSheet": {
|
||||
"stand": "3eb72eab0a394c78b13e88c8dc4a5ed0",
|
||||
"move": "c96c11f9a3f845a4b6a27d9ca10ab103",
|
||||
"hit": "4b67b539c09d4ce183ae6a73f908511f",
|
||||
"die": "7681817f225a4245a27943da77d5f5b1",
|
||||
"skill": "75c873675b6d45c38f24c8d7b98b4800",
|
||||
"attack": "9db703c9da694490965897db7f2d4d92",
|
||||
"skill2": "beabf049b5e34c25907ae69d2c1f835e",
|
||||
"skill3": "e84c350104ca436b93db6c502faf53b3",
|
||||
"skill4": "a5fb992ff4c04431a171bdd2fbfb372c",
|
||||
"skillAfter4": "53de30457ceb44eca4ef2a81396e6adb",
|
||||
"attack2": "52c1da942bec459b9d46c81c03233c0c"
|
||||
},
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.SpriteRendererComponent",
|
||||
"ActionSheet": {},
|
||||
"EndFrameIndex": 0,
|
||||
"RenderSetting": 1,
|
||||
"SortingLayer": "MapLayer0",
|
||||
"SpriteRUID": "3eb72eab0a394c78b13e88c8dc4a5ed0",
|
||||
"StartFrameIndex": 0,
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.RigidbodyComponent",
|
||||
"MoveVelocity": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"RealMoveVelocity": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.MovementComponent",
|
||||
"InputSpeed": 0,
|
||||
"JumpForce": 0,
|
||||
"Enable": false
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.StateComponent",
|
||||
"IsLegacy": false,
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.HitComponent",
|
||||
"BoxSize": {
|
||||
"x": 0.87,
|
||||
"y": 1.04
|
||||
},
|
||||
"ColliderOffset": {
|
||||
"x": 0.0150000155,
|
||||
"y": 0.669999957
|
||||
},
|
||||
"IsLegacy": false,
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.DamageSkinSpawnerComponent",
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "script.Monster",
|
||||
"Enable": true,
|
||||
"IsDead": false
|
||||
},
|
||||
{
|
||||
"@type": "script.MonsterAttack",
|
||||
"Enable": true,
|
||||
"SpriteSize": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"PositionOffset": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.KinematicbodyComponent",
|
||||
"MoveVelocity": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Enable": true
|
||||
},
|
||||
{
|
||||
"@type": "MOD.Core.SideviewbodyComponent",
|
||||
"MoveVelocity": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"Enable": true
|
||||
}
|
||||
],
|
||||
"@version": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -64,6 +64,17 @@ local function apply()
|
||||
cam.ScreenOffset = Vector2(${CAM.screenOffsetX}, ${CAM.screenOffsetY})
|
||||
cam.ConfineCameraArea = ${CAM.confineCameraArea}
|
||||
cam.CameraOffset = Vector2(${CAM.cameraOffsetX}, ${CAM.cameraOffsetY})
|
||||
end
|
||||
local pc = nil
|
||||
if lp ~= nil then
|
||||
pc = lp.PlayerControllerComponent
|
||||
if pc ~= nil then
|
||||
pc.LookDirectionX = 1
|
||||
pc.FixedLookAt = true
|
||||
pc.Enable = false
|
||||
end
|
||||
end
|
||||
if cam ~= nil and pc ~= nil then
|
||||
_TimerService:ClearTimer(eventId)
|
||||
elseif self.CamTries > 30 then
|
||||
_TimerService:ClearTimer(eventId)
|
||||
|
||||
Reference in New Issue
Block a user