Editor offset, global On click, Coin container in the jump-and-run seed

- SceneObject.editorOffset (x/y): shifts only where an object is drawn in
  the Scene tab, cascades to children, undo-able with a reset action.
  Never written into container templates.
- On click without an owner now fires for any click inside the camera
  frame instead of hit-testing the (editor-only) behavior symbol.
- seed-jumprun: coins are a "Coin" container (sprite + trigger), nested
  containers are expanded recursively, Destroy targets the coin's parent,
  and the clock uses a Ceil node instead of ToText.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-08 07:34:00 +02:00
1 parent 2511483a67
commit 3234eb480f
14 files changed
+229 -53

No files matched your search

+7
View File
@@ -15,6 +15,12 @@ export interface SceneObject {
* draw order `z`, which is relative as well. See `hierarchy.ts` for world coordinates.
*/
position: Position;
/**
* Editor-only shift of where this object (and everything below it) is *drawn* in the scene
* view – never part of the game. It exists to pull objects apart that sit on top of each
* other, such as the title/win/lose screens of a game, without moving them for real.
*/
editorOffset: Vec2;
overrides: PropertyBag;
/**
* Parent object of the same scene, empty string = top level. Children move with their
@@ -37,6 +43,7 @@ export function createSceneObject(id: string, assetId: string, position: Vec2 |
assetId,
name: '',
position: { x: position.x, y: position.y, z: 'z' in position ? position.z : 0 },
editorOffset: { x: 0, y: 0 },
overrides: {},
parentId,
templateId: '',