Skip to content

Commit 3c99f90

Browse files
committed
Added 'with' to example
1 parent a4cd64d commit 3c99f90

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"--plugin=${workspaceFolder}/bazel-bin/external/ecsact_lang_cpp/cpp_meta_header_codegen/ecsact_cpp_meta_header_codegen",
1717
"--plugin=${workspaceFolder}/bazel-bin/external/ecsact_lang_csharp/csharp_codegen/ecsact_csharp_codegen"
1818
],
19-
"type": "lldb",
19+
"type": "cppdbg",
2020
"windows": {
2121
"type": "cppvsdbg",
2222
"program": "${workspaceFolder}/bazel-bin/cli/ecsact.exe"

examples/example.ecsact

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@ action Jump {
4646
readwrite Velocity;
4747
}
4848

49+
component Attacking {
50+
entity target;
51+
}
52+
53+
action Attack {
54+
entity target;
55+
adds Attacking;
56+
}
57+
58+
system AttackDamage {
59+
readonly Attacking with target {
60+
readwrite Health;
61+
}
62+
}
63+
4964
system Gravity {
5065
readwrite Position;
5166
readwrite Velocity;
@@ -60,6 +75,19 @@ system Collision {
6075
}
6176
}
6277

78+
system PoisonCloudSpawner {
79+
generates {
80+
required Position;
81+
required Poisonous;
82+
}
83+
84+
generates {
85+
required Position;
86+
required Poisonous;
87+
optional Health;
88+
}
89+
}
90+
6391
system {
6492
readonly Position;
6593
readonly Poisonous;

0 commit comments

Comments
 (0)