@wwawing/assets 4.0.3 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/script/index.js +52 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwawing/assets",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
4
4
  "description": "WWA Wing asset files",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -32,5 +32,5 @@
32
32
  "node": ">=24",
33
33
  "npm": ">=11"
34
34
  },
35
- "gitHead": "c72197df927c7f0c6e16e70c9f13384567350772"
35
+ "gitHead": "a8975bdcff55b22bd200116a933172f147c40df9"
36
36
  }
package/script/index.js CHANGED
@@ -47,3 +47,55 @@ function CALL_SAVE() {
47
47
  function CALL_FRAME() {
48
48
  v[0]=TIME;
49
49
  }
50
+
51
+ function show_sword() {
52
+ v["sword_x"] = 160;
53
+ v["sword_y"] = 160;
54
+ PICTURE(1, {
55
+ pos: [v["sword_x"], v["sword_x"]],
56
+ img: [4, 2],
57
+ size: [120, 120]
58
+ });
59
+ MANUAL_PAUSE("next_action", "exec_up", "exec_down", "exec_right", "exec_left");
60
+ }
61
+
62
+ function next_action() {
63
+ MSG("画面がクリックされました");
64
+ PICTURE(1);
65
+ }
66
+
67
+ function exec_up() {
68
+ v["sword_y"] -= 10;
69
+ PICTURE(1, {
70
+ pos: [v["sword_x"], v["sword_y"]],
71
+ img: [4, 2],
72
+ size: [120, 120]
73
+ });
74
+ }
75
+
76
+ function exec_down() {
77
+ v["sword_y"] += 10;
78
+ PICTURE(1, {
79
+ pos: [v["sword_x"], v["sword_y"]],
80
+ img: [4, 2],
81
+ size: [120, 120]
82
+ });
83
+ }
84
+
85
+ function exec_right() {
86
+ v["sword_x"] += 10;
87
+ PICTURE(1, {
88
+ pos: [v["sword_x"], v["sword_y"]],
89
+ img: [4, 2],
90
+ size: [120, 120]
91
+ });
92
+ }
93
+
94
+ function exec_left() {
95
+ v["sword_x"] -= 10;
96
+ PICTURE(1, {
97
+ pos: [v["sword_x"], v["sword_y"]],
98
+ img: [4, 2],
99
+ size: [120, 120]
100
+ });
101
+ }