Compare commits
510 Commits
03a9130bc5
...
item_chang
| Author | SHA1 | Date | |
|---|---|---|---|
| 34c125e6bb | |||
| 66905c9b53 | |||
|
|
a1f4a29eb3 | ||
| a6ea1b1873 | |||
|
|
47ceb2f613 | ||
| bf6b0d50c3 | |||
| c7603a163f | |||
| a20c80d922 | |||
| e14007b7f4 | |||
| b17c134c9a | |||
| fe0241ac88 | |||
| 0ab6ef1343 | |||
|
|
638946d23a | ||
|
|
b56668dcbe | ||
| d6faf8642a | |||
| 68b1455c53 | |||
| 9615e1e251 | |||
| c755485855 | |||
| d503413140 | |||
|
|
ac31c3ae65 | ||
|
|
549040c339 | ||
| c246d8d654 | |||
| b475df6f68 | |||
| 230b47061d | |||
| 8ce38c3c13 | |||
| 5451f0b31f | |||
| 92b4e8662f | |||
| 2f377d2d7a | |||
| 363ee1cd33 | |||
| 97198afe18 | |||
|
|
fdc4a6f2c1 | ||
|
|
843a100218 | ||
|
|
8001556f37 | ||
| 90d054a3c6 | |||
| aba325ff2b | |||
| bfaa324e6a | |||
| f08c69fa10 | |||
| 9d6aa6d88d | |||
| 654e368a65 | |||
| ce727b523a | |||
|
|
6a474576f0 | ||
| 8dd194a202 | |||
| 70a33d68cf | |||
| da8c4209d7 | |||
| c6fbc9f553 | |||
| 36b851254e | |||
| 147f04d2ff | |||
| 8ea881edb3 | |||
| 8a99771491 | |||
| d45bc67722 | |||
| 13ebe54474 | |||
| b9a1888bfc | |||
| 5ae556cb4b | |||
| 52dc8fb9e4 | |||
| affa5e1f79 | |||
|
|
35a625f636 | ||
|
|
d5de5f7379 | ||
| 3e6e21977e | |||
|
|
4a2d131276 | ||
|
|
d9c2ba7ed1 | ||
| 051ffbbcb1 | |||
| 9747d7d2c5 | |||
| 34dce8c5a2 | |||
| 51010c4f7d | |||
| fd96eb2dc9 | |||
| 51c8f26e50 | |||
| 4c90eb6f07 | |||
| 30f0a078a9 | |||
| 6e4a4d605c | |||
|
|
836b9eb26d | ||
|
|
cb2df83079 | ||
| 0282ef68f3 | |||
|
|
1678d79bbd | ||
|
|
20d2890b37 | ||
|
|
e85c8d51f1 | ||
|
|
3e178257aa | ||
|
|
25b6d53ec4 | ||
| a9ed8fda10 | |||
|
|
4801d7d9b3 | ||
|
|
f08817a586 | ||
|
|
4b23c2ca6f | ||
| 39b2bc631d | |||
| f346f0f529 | |||
| 4ffe04fcff | |||
| 2ef838f270 | |||
| e63a94210c | |||
| 865934399d | |||
| 2622ed4423 | |||
| 79dd6eb33a | |||
|
|
bba0bb5ecd | ||
|
|
d6b20ce4c2 | ||
|
|
60d8c55c7d | ||
| d3a3c18d13 | |||
|
|
12993bced0 | ||
|
|
8fd7a5133d | ||
|
|
97472f2a61 | ||
| 5284a7c00d | |||
|
|
92b39c1ee9 | ||
| faf3288061 | |||
| b715d6b459 | |||
| 9897acffac | |||
| aa9e14c498 | |||
| 945c5e14bb | |||
| a1f67c3d71 | |||
|
|
670f8baabf | ||
|
|
6a62d3d943 | ||
| 3fe45cb3e7 | |||
|
|
db218f26e7 | ||
|
|
eb4e901c8a | ||
| 48a00933d9 | |||
|
|
be8bbcac28 | ||
| c5cb586e4b | |||
| 1e97eb9ede | |||
|
|
0591dccc31 | ||
|
|
70f7642d0f | ||
| 7e8826f143 | |||
|
|
f13afc9fdc | ||
| 04543fcfac | |||
| 5b9de11e5a | |||
| 678916be89 | |||
|
|
f39bd8ecdb | ||
|
|
76f4adc5be | ||
|
|
95227946d1 | ||
|
|
1ee3e97f85 | ||
| 6f90a0985a | |||
| 34742d568e | |||
|
|
3c369f79f7 | ||
|
|
fe45f0bcf2 | ||
| edff41af22 | |||
| 4ee4e02a51 | |||
| 8f8cc217dc | |||
| c491ea5050 | |||
|
|
725547d388 | ||
|
|
539430d112 | ||
| 46402401b4 | |||
| ed9e611fd9 | |||
| db7a1df1f7 | |||
|
|
3e8c11d55d | ||
| 613fc3bf60 | |||
| f69e219643 | |||
|
|
0afbf38bf9 | ||
|
|
23fdf7309d | ||
| fcffdb3b35 | |||
| 7210133330 | |||
|
|
e7bae342c9 | ||
|
|
c22fde3bb5 | ||
|
|
7cb5b20293 | ||
| a5846e08dc | |||
| 7b7fc910bd | |||
| 9fc875eda5 | |||
|
|
dc3c458414 | ||
|
|
ba38c6443c | ||
| 575a565a2c | |||
| 21d8c4770d | |||
|
|
1a77695155 | ||
|
|
11cbb8c4e5 | ||
| eed50bc04e | |||
| 2d55ae9cc4 | |||
| 0b909e4e7e | |||
| 7e6dca1c29 | |||
| 720696aed0 | |||
| 286c221530 | |||
| f5360adbf1 | |||
| bc161a58b3 | |||
| f0c4e65783 | |||
| 6ec45c4805 | |||
| 44fd8c82b0 | |||
|
|
20b659681a | ||
|
|
2786c95c22 | ||
|
|
b0f6aa176e | ||
| e29bef51c5 | |||
|
|
9ed5f8600c | ||
|
|
4c5281c852 | ||
|
|
8e030aabcd | ||
| d692d5c705 | |||
|
|
9bfb410f99 | ||
|
|
18cf7e062c | ||
| aa624f7784 | |||
| 1545ec73b0 | |||
|
|
06608fe435 | ||
| 0bf87c0dc2 | |||
|
|
57b61e86a4 | ||
| ec0f9ebff7 | |||
|
|
ad29e57fc9 | ||
|
|
f2e22032df | ||
|
|
122d0e7794 | ||
| 3bcb747473 | |||
| 6ee1788337 | |||
| 70fe9e953b | |||
| abf34d7d9e | |||
| 6f582fcca1 | |||
| 70d1871985 | |||
| 0bac61a762 | |||
| 2ea96e5933 | |||
| 2a3c80a7af | |||
| 1d36879fbb | |||
| 0292888351 | |||
|
|
4374bc54f5 | ||
|
|
1b6a7713a8 | ||
|
|
5bb4aca510 | ||
| 30363d3513 | |||
| 9f26b5fda7 | |||
| 9107b8c570 | |||
|
|
578cde65cc | ||
|
|
3aa1d66040 | ||
| 7e9114bfd1 | |||
| 928112188b | |||
| 5403aa42f9 | |||
|
|
be47f38963 | ||
|
|
84b95abfa1 | ||
| f75cd03744 | |||
| 78e08bec5c | |||
| 84f0f8338f | |||
|
|
a7b959be87 | ||
|
|
e7f5da5b1a | ||
| 7c2d61a36a | |||
|
|
e526fdd1c3 | ||
| adedef6cc3 | |||
| 53ac818776 | |||
| 75e22e9837 | |||
|
|
32baff1fd6 | ||
|
|
c3d720d653 | ||
|
|
2f00eda29d | ||
|
|
13cd16f9e0 | ||
|
|
94c6c212ca | ||
|
|
faa9bcd66b | ||
| 7cbb93822b | |||
| 4808b1dd63 | |||
|
|
b501d22782 | ||
|
|
32ecc3752a | ||
|
|
a4d475c07b | ||
|
|
f7b14dee4f | ||
|
|
28380d398c | ||
|
|
b04956ea4d | ||
| a4205f1963 | |||
| 92e9351766 | |||
|
|
6e6d5e5edc | ||
|
|
4364c93c5c | ||
| 80d4838338 | |||
|
|
9867734d0d | ||
|
|
908202d855 | ||
|
|
65bcd4b5b7 | ||
|
|
09abd588c2 | ||
| 4f1251d402 | |||
| d830a05d98 | |||
| 8368a55d7c | |||
| f8a27d7ba6 | |||
| 953cba40c6 | |||
| bd6794dafd | |||
| 7c694149c2 | |||
| 5725e7a6fb | |||
| 17265a3a26 | |||
|
|
d8a49124b9 | ||
|
|
34c6e5cbe8 | ||
| d3b67c1825 | |||
| ee898bf1cd | |||
| f12841f88f | |||
| 5d49842c04 | |||
| 6826fecd16 | |||
| 54d9bcf52d | |||
| 0880b74695 | |||
| 3efab7e233 | |||
| bdc3bdf61d | |||
| cf03c75ada | |||
| f33616dda4 | |||
| 39f791e2b4 | |||
| 338e303fbb | |||
| 97c082f87a | |||
| 7ab5e32c74 | |||
| 68c91d8f13 | |||
| 78cdda97b9 | |||
| 24b4227425 | |||
| 03caa13ceb | |||
| 078bfb9e45 | |||
| 753ba60f0f | |||
| a7381658f4 | |||
| 40e7fd0ef2 | |||
| 3b7ef1b801 | |||
| e95188efc8 | |||
| ac39a62e27 | |||
| ac55af0cb6 | |||
| d5108fbc1e | |||
| 63391ef82a | |||
| c923f549b9 | |||
| 84c26dbf0a | |||
| f6a2d28dde | |||
| 762444fe2c | |||
| b8e23ac9c4 | |||
| 20dad3069a | |||
| ffc3177244 | |||
| 2378030a0f | |||
| 096786f97e | |||
| 8a9a2313fe | |||
| 9d3621dd2c | |||
| 114ff35630 | |||
| 6bc258778f | |||
| bc53b3c5f3 | |||
| 8d44c58fc8 | |||
| 84c4d1b9ce | |||
| f69c6b94a1 | |||
| 8df8a85429 | |||
| 52e42ea38d | |||
| 2834806351 | |||
| f6c42747ca | |||
| 79f57264ec | |||
| 13e2ef90c8 | |||
| f50eaa1847 | |||
| 5e863dfd81 | |||
| 79bf3d598b | |||
| 4f30086e52 | |||
| 07582d8202 | |||
| 22c9590442 | |||
| 76b94f7be3 | |||
| 29af9062b5 | |||
| 294c52dc40 | |||
| f060229b5e | |||
| 192f2eb316 | |||
| ed12c1cf15 | |||
| a1c26ed7fb | |||
| 23049b3231 | |||
| d8c5bc8f78 | |||
| b93630756c | |||
| ae017dd679 | |||
| 84570fe87d | |||
| 8a61104868 | |||
| d30fa35546 | |||
| fe3c539a62 | |||
| 93c04440d4 | |||
| c3bfab5f53 | |||
| e7ef669c29 | |||
| 65e4af8595 | |||
| b7bf4f3d10 | |||
| 1cb79f5b30 | |||
| 3b5ee84ce2 | |||
| a09f6ec5a5 | |||
| 12cbb82ac9 | |||
| e038901f2b | |||
| 2bb3bc2259 | |||
| e050d20071 | |||
| c6fb5c1702 | |||
| 42446b4ac4 | |||
| 3d3ebc11d1 | |||
| 819dd672aa | |||
| ec182e87f0 | |||
| 5b57939452 | |||
| e7a48a08ee | |||
| 8cc6d85265 | |||
| d35e81a9a8 | |||
| a9cb43b79e | |||
| b733a30724 | |||
| 2da4b8958d | |||
| c04be837bb | |||
| 14b7093e00 | |||
| 4baa492ab1 | |||
| 4363c4d2eb | |||
| 78068e1170 | |||
| d883b2b05f | |||
| f153a53d8d | |||
| a41c443004 | |||
| b26654346b | |||
| 3860155675 | |||
| 990da695f2 | |||
| 4ac70b1ca7 | |||
| 05295f535a | |||
| 2439791d05 | |||
| bcb3262743 | |||
| 66661054bf | |||
| d9cb9fb31e | |||
| f41c0ec025 | |||
| 9f3101b866 | |||
| 2589ed98d2 | |||
| 77aa58f88e | |||
| cfa79f262f | |||
| 221ade11e3 | |||
| 282a2eddb0 | |||
| 0d7242c96d | |||
| 22a930358c | |||
| 45f1f5df01 | |||
| 669a489f64 | |||
| 5404f8e7b0 | |||
| f71412d946 | |||
| 44333e52c2 | |||
| 5ce65aa57a | |||
| 368e774176 | |||
| 05c05ef102 | |||
| 60ecb7d113 | |||
| ad3b26f451 | |||
| 08d6ad3573 | |||
| 19915d7d6e | |||
| 17b55db196 | |||
| f0d38d8fe8 | |||
| a1c66df038 | |||
| 9352e4c0fd | |||
| 556f12de1e | |||
| 3e42ee4914 | |||
| 0038e78a2b | |||
| 1f9c05c0a7 | |||
| b8e5794d48 | |||
| fe1a1e61ef | |||
| 0cdae88952 | |||
| 4e6c545e81 | |||
| badc6d2375 | |||
| 4910ff7770 | |||
| f3a51de28a | |||
| 9cb696ca86 | |||
| 334a4a0b34 | |||
| 5d2b9ca247 | |||
| 5d9520bc59 | |||
| bb0c8872f0 | |||
| b42c2fcc21 | |||
| e525ede13d | |||
| d135be4318 | |||
| 09e340179d | |||
| 8068f33302 | |||
| 270ded8ef7 | |||
| f0cfd39471 | |||
| 7a6cea145d | |||
| 8ddfe86750 | |||
| 8d4177f8b1 | |||
| df89a2e4d6 | |||
| 9bbceba973 | |||
| 6d29e41f3a | |||
| ed333f373b | |||
| e6584ec4dc | |||
| 167989be99 | |||
| dcb867e0bb | |||
| 41c24c5ab3 | |||
| 7f1f1a8a14 | |||
| a4c18e7cf6 | |||
| 68c7b30e57 | |||
| 59390c04bf | |||
| f490a390aa | |||
| 84ee313ce5 | |||
| 490f0d17d2 | |||
| 01477b9a0e | |||
| 28136545b4 | |||
| 0edaa65682 | |||
| 7bd374161f | |||
| d5c81d6587 | |||
| 884f283ead | |||
| b7a982d340 | |||
| 27fa657f92 | |||
| 9b8884d459 | |||
| 60f7c92139 | |||
| 993ec2bf1b | |||
| dac4e26662 | |||
| 354813e6e0 | |||
| d0c78e54a7 | |||
| 55c521db3a | |||
| 660a5f5553 | |||
| 8143da44db | |||
| 4a1fdd94f8 | |||
| 470b853916 | |||
| b42b248c0b | |||
| 7680ab8b45 | |||
| 096bcd6168 | |||
| cd8806a9fe | |||
| 0a71339bbe | |||
| 5f05494fe1 | |||
| 57b9d9b64a | |||
| 8ea532bcfa | |||
| 1d7d70e033 | |||
| f0e75703f6 | |||
| 875fa026df | |||
| 043d7f1ba8 | |||
| af384d3ddb | |||
| b4662a0c7b | |||
| 149c8d9571 | |||
| 4d47a7586e | |||
| 6a4eb81529 | |||
| 0c9b1cd689 | |||
| 7268cb445a | |||
| d854f159b4 | |||
| 081bde1d9a | |||
| 83e0566ae8 | |||
| 62a9f99b81 | |||
| 911f75da14 | |||
| 086370987c | |||
| b5798e7bc0 | |||
| 4986cca661 | |||
| f13b9cdd9f | |||
| f8f3c9842f | |||
| edef839b87 | |||
| fc33b07dc7 | |||
| 699b4b95cf | |||
| 6e97058905 | |||
| 3e0846223e | |||
| 9cc88028dd | |||
| e7804cd229 | |||
| 09f9566a0d | |||
| 4a371021c1 | |||
| ca9ba8c81f | |||
| 2ac4660d1b | |||
| 847ad13c4b | |||
| ad5213a940 | |||
| 8ac19797f0 | |||
| 07295da93c | |||
| 1dfc61f003 | |||
| a47d1306b9 | |||
| 29a6d1072c | |||
| 5240fd5f92 | |||
| c6eaf19eb0 | |||
| c308fadb87 | |||
| f223102525 | |||
| 872f246a23 | |||
| b470a9d2fe | |||
| fbaf698852 | |||
| 4c2731bc7b | |||
| 5d6b94ddf6 | |||
| 3665150342 |
241
.editorconfig
241
.editorconfig
@@ -1,4 +1,239 @@
|
|||||||
[*.cs]
|
# Remove the line below if you want to inherit .editorconfig settings from higher directories
|
||||||
|
root = true
|
||||||
|
|
||||||
# CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
|
# C# files
|
||||||
dotnet_diagnostic.CS8632.severity = silent
|
[*.cs]
|
||||||
|
|
||||||
|
csharp_style_namespace_declarations = file_scoped:warning
|
||||||
|
|
||||||
|
#### Core EditorConfig Options ####
|
||||||
|
|
||||||
|
# Indentation and spacing
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
end_of_line = crlf
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
#### .NET Coding Conventions ####
|
||||||
|
|
||||||
|
# Organize usings
|
||||||
|
dotnet_separate_import_directive_groups = false
|
||||||
|
dotnet_sort_system_directives_first = false
|
||||||
|
file_header_template = unset
|
||||||
|
|
||||||
|
# this. and Me. preferences
|
||||||
|
dotnet_style_qualification_for_event = false
|
||||||
|
dotnet_style_qualification_for_field = false
|
||||||
|
dotnet_style_qualification_for_method = false
|
||||||
|
dotnet_style_qualification_for_property = false
|
||||||
|
|
||||||
|
# Language keywords vs BCL types preferences
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||||
|
dotnet_style_predefined_type_for_member_access = true
|
||||||
|
|
||||||
|
# Parentheses preferences
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||||
|
|
||||||
|
# Modifier preferences
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||||
|
|
||||||
|
# Expression-level preferences
|
||||||
|
dotnet_style_coalesce_expression = true
|
||||||
|
dotnet_style_collection_initializer = true
|
||||||
|
dotnet_style_explicit_tuple_names = true
|
||||||
|
dotnet_style_namespace_match_folder = true
|
||||||
|
dotnet_style_null_propagation = true
|
||||||
|
dotnet_style_object_initializer = true
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
dotnet_style_prefer_auto_properties = true
|
||||||
|
dotnet_style_prefer_collection_expression = when_types_loosely_match
|
||||||
|
dotnet_style_prefer_compound_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = true
|
||||||
|
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true
|
||||||
|
|
||||||
|
# Field preferences
|
||||||
|
dotnet_style_readonly_field = true
|
||||||
|
|
||||||
|
# Parameter preferences
|
||||||
|
dotnet_code_quality_unused_parameters = all
|
||||||
|
|
||||||
|
# Suppression preferences
|
||||||
|
dotnet_remove_unnecessary_suppression_exclusions = none
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
dotnet_style_allow_multiple_blank_lines_experimental = false
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||||
|
|
||||||
|
#### C# Coding Conventions ####
|
||||||
|
|
||||||
|
# var preferences
|
||||||
|
csharp_style_var_elsewhere = false
|
||||||
|
csharp_style_var_for_built_in_types = false
|
||||||
|
csharp_style_var_when_type_is_apparent = false
|
||||||
|
|
||||||
|
# Expression-bodied members
|
||||||
|
csharp_style_expression_bodied_accessors = when_on_single_line
|
||||||
|
csharp_style_expression_bodied_constructors = false
|
||||||
|
csharp_style_expression_bodied_indexers = when_on_single_line
|
||||||
|
csharp_style_expression_bodied_lambdas = when_on_single_line
|
||||||
|
csharp_style_expression_bodied_local_functions = when_on_single_line
|
||||||
|
csharp_style_expression_bodied_methods = when_on_single_line
|
||||||
|
csharp_style_expression_bodied_operators = when_on_single_line
|
||||||
|
csharp_style_expression_bodied_properties = when_on_single_line
|
||||||
|
|
||||||
|
# Pattern matching preferences
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true
|
||||||
|
csharp_style_prefer_extended_property_pattern = true
|
||||||
|
csharp_style_prefer_not_pattern = true
|
||||||
|
csharp_style_prefer_pattern_matching = true
|
||||||
|
csharp_style_prefer_switch_expression = true
|
||||||
|
|
||||||
|
# Null-checking preferences
|
||||||
|
csharp_style_conditional_delegate_call = true
|
||||||
|
|
||||||
|
# Modifier preferences
|
||||||
|
csharp_prefer_static_anonymous_function = true
|
||||||
|
csharp_prefer_static_local_function = true
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
|
||||||
|
csharp_style_prefer_readonly_struct = true
|
||||||
|
csharp_style_prefer_readonly_struct_member = true
|
||||||
|
|
||||||
|
# Code-block preferences
|
||||||
|
csharp_prefer_braces = true
|
||||||
|
csharp_prefer_simple_using_statement = true
|
||||||
|
csharp_style_namespace_declarations = block_scoped
|
||||||
|
csharp_style_prefer_method_group_conversion = true
|
||||||
|
csharp_style_prefer_primary_constructors = true
|
||||||
|
csharp_style_prefer_top_level_statements = true
|
||||||
|
|
||||||
|
# Expression-level preferences
|
||||||
|
csharp_prefer_simple_default_expression = true
|
||||||
|
csharp_style_deconstructed_variable_declaration = true
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true
|
||||||
|
csharp_style_inlined_variable_declaration = true
|
||||||
|
csharp_style_prefer_index_operator = true
|
||||||
|
csharp_style_prefer_local_over_anonymous_function = true
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true
|
||||||
|
csharp_style_prefer_range_operator = true
|
||||||
|
csharp_style_prefer_tuple_swap = true
|
||||||
|
csharp_style_prefer_utf8_string_literals = true
|
||||||
|
csharp_style_throw_expression = true
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable
|
||||||
|
|
||||||
|
# 'using' directive preferences
|
||||||
|
csharp_using_directive_placement = outside_namespace
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = false
|
||||||
|
|
||||||
|
#### C# Formatting Rules ####
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_new_line_before_catch = true
|
||||||
|
csharp_new_line_before_else = true
|
||||||
|
csharp_new_line_before_finally = true
|
||||||
|
csharp_new_line_before_members_in_anonymous_types = true
|
||||||
|
csharp_new_line_before_members_in_object_initializers = true
|
||||||
|
csharp_new_line_before_open_brace = all
|
||||||
|
csharp_new_line_between_query_expression_clauses = true
|
||||||
|
|
||||||
|
# Indentation preferences
|
||||||
|
csharp_indent_block_contents = true
|
||||||
|
csharp_indent_braces = false
|
||||||
|
csharp_indent_case_contents = true
|
||||||
|
csharp_indent_case_contents_when_block = true
|
||||||
|
csharp_indent_labels = one_less_than_current
|
||||||
|
csharp_indent_switch_labels = true
|
||||||
|
|
||||||
|
# Space preferences
|
||||||
|
csharp_space_after_cast = false
|
||||||
|
csharp_space_after_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_after_comma = true
|
||||||
|
csharp_space_after_dot = false
|
||||||
|
csharp_space_after_keywords_in_control_flow_statements = true
|
||||||
|
csharp_space_after_semicolon_in_for_statement = true
|
||||||
|
csharp_space_around_binary_operators = before_and_after
|
||||||
|
csharp_space_around_declaration_statements = false
|
||||||
|
csharp_space_before_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_before_comma = false
|
||||||
|
csharp_space_before_dot = false
|
||||||
|
csharp_space_before_open_square_brackets = false
|
||||||
|
csharp_space_before_semicolon_in_for_statement = false
|
||||||
|
csharp_space_between_empty_square_brackets = false
|
||||||
|
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||||
|
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||||
|
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_parentheses = false
|
||||||
|
csharp_space_between_square_brackets = false
|
||||||
|
|
||||||
|
# Wrapping preferences
|
||||||
|
csharp_preserve_single_line_blocks = true
|
||||||
|
csharp_preserve_single_line_statements = false
|
||||||
|
|
||||||
|
#### Naming styles ####
|
||||||
|
|
||||||
|
# Naming rules
|
||||||
|
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_field.severity = warning
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_field.symbols = private_or_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_field.style = private_field
|
||||||
|
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||||
|
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
# Symbol specifications
|
||||||
|
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types.required_modifiers =
|
||||||
|
|
||||||
|
# Naming styles
|
||||||
|
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||||
|
dotnet_naming_style.begins_with_i.required_suffix =
|
||||||
|
dotnet_naming_style.begins_with_i.word_separator =
|
||||||
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.private_field.required_prefix = _
|
||||||
|
dotnet_naming_style.private_field.required_suffix =
|
||||||
|
dotnet_naming_style.private_field.word_separator =
|
||||||
|
dotnet_naming_style.private_field.capitalization = camel_case
|
||||||
|
|||||||
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ko_fi: rubonnek
|
||||||
723
.gitignore
vendored
723
.gitignore
vendored
@@ -1,7 +1,722 @@
|
|||||||
# Godot 4+ specific ignores
|
# Godot 4+ specific ignores
|
||||||
.godot/
|
|
||||||
/android/
|
|
||||||
Build/
|
Build/
|
||||||
.vs
|
|
||||||
Output/
|
Output/
|
||||||
.deploy_to_steamos/
|
.deploy_to_steamos/
|
||||||
|
.godot/
|
||||||
|
|
||||||
|
# Rider
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding add-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Rider
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Visual Studio Code
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# JustCode is a .NET coding add-in
|
||||||
|
.JustCode
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
/Zennysoft.Game.Ma/src/map/dungeon/models/Area 2/Puer/A2-Puer.glb.import
|
||||||
|
/Zennysoft.Game.Ma/src/audio/AMB/amb_beach.wav.import
|
||||||
|
/Zennysoft.Game.Ma/src/audio/AMB/amb_perlin.wav.import
|
||||||
|
/Zennysoft.Game.Ma/src/audio/AMB/amb_white_noise.wav.import
|
||||||
|
/Zennysoft.Game.Ma/src/audio/AMB/amb_wind_loop_altar.wav.import
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
<Project Sdk="Godot.NET.Sdk/4.4.0-dev.1">
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net8.0</TargetFramework>
|
|
||||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
|
|
||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Chickensoft.AutoInject" Version="2.3.0" />
|
|
||||||
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.2.22" />
|
|
||||||
<PackageReference Include="Chickensoft.Introspection.Generator" Version="1.5.0" />
|
|
||||||
<PackageReference Include="Chickensoft.LogicBlocks" Version="5.4.0" />
|
|
||||||
<PackageReference Include="Chickensoft.LogicBlocks.DiagramGenerator" Version="5.4.0" />
|
|
||||||
<PackageReference Include="Chickensoft.SaveFileBuilder" Version="1.1.0" />
|
|
||||||
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.4.0" />
|
|
||||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="21.0.29" />
|
|
||||||
<PackageReference Include="Zeroconf" Version="3.6.11" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="src\map\dungeon\corridor\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include=".editorconfig" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
<Project Sdk="Godot.NET.Sdk/4.3.0">
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net8.0</TargetFramework>
|
|
||||||
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
|
|
||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Chickensoft.AutoInject" Version="2.3.0" />
|
|
||||||
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.2.22" />
|
|
||||||
<PackageReference Include="Chickensoft.Introspection.Generator" Version="1.5.0" />
|
|
||||||
<PackageReference Include="Chickensoft.LogicBlocks" Version="5.4.0" />
|
|
||||||
<PackageReference Include="Chickensoft.LogicBlocks.DiagramGenerator" Version="5.4.0" />
|
|
||||||
<PackageReference Include="Chickensoft.SaveFileBuilder" Version="1.1.0" />
|
|
||||||
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.4.0" />
|
|
||||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="21.0.29" />
|
|
||||||
<PackageReference Include="Zeroconf" Version="3.6.11" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="src\map\dungeon\corridor\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include=".editorconfig" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 2012
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameJamDungeon", "GameJamDungeon.csproj", "{B685AA99-B971-46A7-A708-00546BA0EF55}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
ExportDebug|Any CPU = ExportDebug|Any CPU
|
|
||||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
|
||||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
|
||||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
|
||||||
{B685AA99-B971-46A7-A708-00546BA0EF55}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
26
Zennysoft.Game.Abstractions/App/IAppRepo.cs
Normal file
26
Zennysoft.Game.Abstractions/App/IAppRepo.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
namespace Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public interface IAppRepo : IDisposable
|
||||||
|
{
|
||||||
|
event Action? GameEntered;
|
||||||
|
|
||||||
|
event Action? GameExited;
|
||||||
|
|
||||||
|
event Action? SplashScreenSkipped;
|
||||||
|
|
||||||
|
event Action? MainMenuEntered;
|
||||||
|
|
||||||
|
event Action? DataViewerExited;
|
||||||
|
|
||||||
|
void SkipSplashScreen();
|
||||||
|
|
||||||
|
void OnMainMenuEntered();
|
||||||
|
|
||||||
|
void OnEnterGame();
|
||||||
|
|
||||||
|
void OnExitGame();
|
||||||
|
|
||||||
|
void OnGameOver();
|
||||||
|
|
||||||
|
void OnDataViewerExited();
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
namespace Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public interface IDimmableAudioStreamPlayer
|
||||||
|
{
|
||||||
|
/// <summary>Fade this dimmable audio stream track in.</summary>
|
||||||
|
public void FadeIn();
|
||||||
|
/// <summary>Fade this dimmable audio stream track out.</summary>
|
||||||
|
public void FadeOut();
|
||||||
|
|
||||||
|
public void Play(float fromPosition = 0);
|
||||||
|
|
||||||
|
public void Stop();
|
||||||
|
}
|
||||||
5
Zennysoft.Game.Abstractions/Entity/IBehavior.cs
Normal file
5
Zennysoft.Game.Abstractions/Entity/IBehavior.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
namespace Zennysoft.Game.Abstractions.Entity;
|
||||||
|
|
||||||
|
public interface IBehavior
|
||||||
|
{
|
||||||
|
}
|
||||||
11
Zennysoft.Game.Abstractions/Entity/IEntity.cs
Normal file
11
Zennysoft.Game.Abstractions/Entity/IEntity.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
namespace Zennysoft.Game.Abstractions.Entity
|
||||||
|
{
|
||||||
|
public interface IAction
|
||||||
|
{
|
||||||
|
public Task PerformAction();
|
||||||
|
}
|
||||||
|
public interface IAction<T>
|
||||||
|
{
|
||||||
|
public Task PerformAction(T arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
6
Zennysoft.Game.Abstractions/Entity/IKillable.cs
Normal file
6
Zennysoft.Game.Abstractions/Entity/IKillable.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public interface IKillable
|
||||||
|
{
|
||||||
|
public abstract void Die();
|
||||||
|
}
|
||||||
6
Zennysoft.Game.Abstractions/Pickups/IHealthPack.cs
Normal file
6
Zennysoft.Game.Abstractions/Pickups/IHealthPack.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public interface IHealthPack
|
||||||
|
{
|
||||||
|
public int RestoreAmount { get; }
|
||||||
|
}
|
||||||
18
Zennysoft.Game.Abstractions/Save/ISaveFileManager.cs
Normal file
18
Zennysoft.Game.Abstractions/Save/ISaveFileManager.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System.Text.Json.Serialization.Metadata;
|
||||||
|
|
||||||
|
namespace Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public interface ISaveFileManager
|
||||||
|
{
|
||||||
|
public Task WriteToFile<T>(T gameData, params IJsonTypeInfoResolver?[] resolvers);
|
||||||
|
|
||||||
|
public Task WriteToFile<T>(T gameData, string filePath, params IJsonTypeInfoResolver?[] resolvers);
|
||||||
|
|
||||||
|
public Task<T?> ReadFromFile<T>(params IJsonTypeInfoResolver?[] resolvers);
|
||||||
|
|
||||||
|
public Task<T?> ReadFromFile<T>(string filePath, params IJsonTypeInfoResolver?[] resolvers);
|
||||||
|
|
||||||
|
public void DeleteSaveData(string filePath);
|
||||||
|
|
||||||
|
public void DeleteSaveData();
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
namespace Zennysoft.Game.Implementation;
|
||||||
|
|
||||||
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public partial class DimmableAudioStreamPlayer : AudioStreamPlayer, IDimmableAudioStreamPlayer
|
||||||
|
{
|
||||||
|
#region Constants
|
||||||
|
// -60 to -80 is considered inaudible for decibels.
|
||||||
|
public const float VOLUME_DB_INAUDIBLE = -80f;
|
||||||
|
public const double FADE_DURATION = 3d; // seconds
|
||||||
|
#endregion Constants
|
||||||
|
|
||||||
|
public ITween? FadeTween { get; set; }
|
||||||
|
|
||||||
|
public float InitialVolumeDb;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
InitialVolumeDb = VolumeDb;
|
||||||
|
VolumeDb = VOLUME_DB_INAUDIBLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FadeIn()
|
||||||
|
{
|
||||||
|
SetupFade(InitialVolumeDb, Tween.EaseType.Out);
|
||||||
|
Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FadeOut()
|
||||||
|
{
|
||||||
|
SetupFade(VOLUME_DB_INAUDIBLE, Tween.EaseType.In);
|
||||||
|
FadeTween!.TweenCallback(Callable.From(Stop));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetupFade(float volumeDb, Tween.EaseType ease)
|
||||||
|
{
|
||||||
|
FadeTween?.Kill();
|
||||||
|
|
||||||
|
FadeTween = GodotInterfaces.Adapt<ITween>(CreateTween());
|
||||||
|
|
||||||
|
FadeTween.TweenProperty(
|
||||||
|
this,
|
||||||
|
"volume_db",
|
||||||
|
volumeDb,
|
||||||
|
FADE_DURATION
|
||||||
|
).SetTrans(Tween.TransitionType.Circ).SetEase(ease);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
namespace Zennysoft.Game.Implementation;
|
||||||
|
|
||||||
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public partial class DimmableAudioStreamPlayer3D : AudioStreamPlayer3D, IDimmableAudioStreamPlayer
|
||||||
|
{
|
||||||
|
#region Constants
|
||||||
|
// -60 to -80 is considered inaudible for decibels.
|
||||||
|
public const float VOLUME_DB_INAUDIBLE = -80f;
|
||||||
|
public const double FADE_DURATION = 3d; // seconds
|
||||||
|
#endregion Constants
|
||||||
|
|
||||||
|
public ITween? FadeTween { get; set; }
|
||||||
|
|
||||||
|
public float InitialVolumeDb;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
InitialVolumeDb = VolumeDb;
|
||||||
|
VolumeDb = VOLUME_DB_INAUDIBLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FadeIn()
|
||||||
|
{
|
||||||
|
SetupFade(InitialVolumeDb, Tween.EaseType.Out);
|
||||||
|
Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FadeOut()
|
||||||
|
{
|
||||||
|
SetupFade(VOLUME_DB_INAUDIBLE, Tween.EaseType.In);
|
||||||
|
FadeTween!.TweenCallback(Callable.From(Stop));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetupFade(float volumeDb, Tween.EaseType ease)
|
||||||
|
{
|
||||||
|
FadeTween?.Kill();
|
||||||
|
|
||||||
|
FadeTween = GodotInterfaces.Adapt<ITween>(CreateTween());
|
||||||
|
|
||||||
|
FadeTween.TweenProperty(
|
||||||
|
this,
|
||||||
|
"volume_db",
|
||||||
|
volumeDb,
|
||||||
|
FADE_DURATION
|
||||||
|
).SetTrans(Tween.TransitionType.Circ).SetEase(ease);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _EnterTree() => FadeIn();
|
||||||
|
|
||||||
|
public override void _ExitTree() => FadeOut();
|
||||||
|
}
|
||||||
10
Zennysoft.Game.Godot.Implementation/Entity/IStackable.cs
Normal file
10
Zennysoft.Game.Godot.Implementation/Entity/IStackable.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
|
||||||
|
namespace Zennysoft.Game.Implementation;
|
||||||
|
|
||||||
|
public interface IStackable
|
||||||
|
{
|
||||||
|
AutoProp<int> Count { get; }
|
||||||
|
|
||||||
|
void SetCount(int count);
|
||||||
|
}
|
||||||
81
Zennysoft.Game.Godot.Implementation/Save/SaveFileManager.cs
Normal file
81
Zennysoft.Game.Godot.Implementation/Save/SaveFileManager.cs
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
using Chickensoft.Serialization.Godot;
|
||||||
|
using Chickensoft.Serialization;
|
||||||
|
using Godot;
|
||||||
|
using System.IO.Abstractions;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization.Metadata;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
namespace Zennysoft.Game.Implementation;
|
||||||
|
|
||||||
|
public class SaveFileManager : ISaveFileManager
|
||||||
|
{
|
||||||
|
private readonly IFileSystem _fileSystem;
|
||||||
|
private string _defaultSaveLocation;
|
||||||
|
public const string DEFAULT_SAVE_FILE_NAME = "game.json";
|
||||||
|
|
||||||
|
public SaveFileManager(IFileSystem fileSystem)
|
||||||
|
{
|
||||||
|
_fileSystem = fileSystem;
|
||||||
|
_defaultSaveLocation = _fileSystem.Path.Join(OS.GetUserDataDir(), DEFAULT_SAVE_FILE_NAME);
|
||||||
|
|
||||||
|
GodotSerialization.Setup();
|
||||||
|
Serializer.AddConverter(new Texture2DConverter());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Task<T?> ReadFromFile<T>(params IJsonTypeInfoResolver?[] resolvers)
|
||||||
|
{
|
||||||
|
if (!_fileSystem.File.Exists(_defaultSaveLocation))
|
||||||
|
throw new FileNotFoundException();
|
||||||
|
return ReadFromFile<T>(_defaultSaveLocation, resolvers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<T?> ReadFromFile<T>(string filePath, params IJsonTypeInfoResolver?[] resolvers)
|
||||||
|
{
|
||||||
|
if (!_fileSystem.File.Exists(filePath))
|
||||||
|
throw new FileNotFoundException();
|
||||||
|
|
||||||
|
var json = await _fileSystem.File.ReadAllTextAsync(filePath);
|
||||||
|
|
||||||
|
var resolver = new SerializableTypeResolver();
|
||||||
|
var upgradeDependencies = new Blackboard();
|
||||||
|
|
||||||
|
var jsonOptions = new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
Converters = {
|
||||||
|
new SerializableTypeConverter(upgradeDependencies)
|
||||||
|
},
|
||||||
|
WriteIndented = true
|
||||||
|
};
|
||||||
|
jsonOptions.TypeInfoResolver = JsonTypeInfoResolver.Combine([resolver, .. resolvers]);
|
||||||
|
return JsonSerializer.Deserialize<T?>(json, jsonOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task WriteToFile<T>(T gameData, params IJsonTypeInfoResolver?[] resolvers)
|
||||||
|
{
|
||||||
|
return WriteToFile(gameData, _defaultSaveLocation, resolvers);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task WriteToFile<T>(T gameData, string filePath, params IJsonTypeInfoResolver?[] resolvers)
|
||||||
|
{
|
||||||
|
var resolver = new SerializableTypeResolver();
|
||||||
|
var upgradeDependencies = new Blackboard();
|
||||||
|
|
||||||
|
var jsonOptions = new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
Converters = {
|
||||||
|
new SerializableTypeConverter(upgradeDependencies)
|
||||||
|
},
|
||||||
|
WriteIndented = true
|
||||||
|
};
|
||||||
|
jsonOptions.TypeInfoResolver = JsonTypeInfoResolver.Combine([resolver, .. resolvers]);
|
||||||
|
var json = JsonSerializer.Serialize(gameData, jsonOptions);
|
||||||
|
await _fileSystem.File.WriteAllTextAsync(filePath, json);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteSaveData() => DeleteSaveData(_defaultSaveLocation);
|
||||||
|
|
||||||
|
public void DeleteSaveData(string filePath) => _fileSystem.File.Delete(filePath);
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
using Godot;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
|
/// <summary>Basis JSON converter.</summary>
|
||||||
|
public class Texture2DConverter : JsonConverter<Texture2D>
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override bool CanConvert(Type typeToConvert) =>
|
||||||
|
typeToConvert == typeof(Texture2D);
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override Texture2D Read(
|
||||||
|
ref Utf8JsonReader reader,
|
||||||
|
Type typeToConvert,
|
||||||
|
JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
var texture2D = new Texture2D();
|
||||||
|
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
if (reader.TokenType == JsonTokenType.EndObject)
|
||||||
|
{
|
||||||
|
return texture2D;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reader.TokenType != JsonTokenType.PropertyName)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var propertyName = reader.GetString();
|
||||||
|
reader.Read();
|
||||||
|
|
||||||
|
switch (propertyName)
|
||||||
|
{
|
||||||
|
case "resource_path":
|
||||||
|
var resourcePath = JsonSerializer.Deserialize<string>(ref reader, options);
|
||||||
|
texture2D = GD.Load<Texture2D>(resourcePath);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new JsonException("Unexpected end when reading Texture2D.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override void Write(
|
||||||
|
Utf8JsonWriter writer,
|
||||||
|
Texture2D value,
|
||||||
|
JsonSerializerOptions options
|
||||||
|
)
|
||||||
|
{
|
||||||
|
var resolver = options.TypeInfoResolver;
|
||||||
|
var resourcePathType = resolver!.GetTypeInfo(typeof(string), options)!;
|
||||||
|
|
||||||
|
writer.WriteStartObject();
|
||||||
|
writer.WritePropertyName("resource_path");
|
||||||
|
JsonSerializer.Serialize(writer, value.ResourcePath, resourcePathType);
|
||||||
|
writer.WriteEndObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.4.0" />
|
||||||
|
<PackageReference Include="Chickensoft.Introspection" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Chickensoft.Introspection.Generator" Version="2.2.0" />
|
||||||
|
<PackageReference Include="Chickensoft.Serialization.Godot" Version="0.7.6" />
|
||||||
|
<PackageReference Include="System.IO.Abstractions" Version="22.0.11" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Zennysoft.Game.Abstractions\Zennysoft.Game.Abstractions.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
70
Zennysoft.Game.Godot.Implementation/cspell.json
Normal file
70
Zennysoft.Game.Godot.Implementation/cspell.json
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"**/*.*"
|
||||||
|
],
|
||||||
|
"ignorePaths": [
|
||||||
|
"**/*.tscn",
|
||||||
|
"**/*.import",
|
||||||
|
"**/badges/**/*.*",
|
||||||
|
"**/coverage/**/*.*",
|
||||||
|
"**/.godot/**/*.*",
|
||||||
|
"**/obj/**/*.*",
|
||||||
|
"**/bin/**/*.*",
|
||||||
|
"**/nupkg/**/*.*"
|
||||||
|
],
|
||||||
|
"words": [
|
||||||
|
"assemblyfilters",
|
||||||
|
"automerge",
|
||||||
|
"branchcoverage",
|
||||||
|
"brandedoutcast",
|
||||||
|
"buildtransitive",
|
||||||
|
"camelcase",
|
||||||
|
"chickenpackage",
|
||||||
|
"Chickensoft",
|
||||||
|
"classfilters",
|
||||||
|
"contentfiles",
|
||||||
|
"CYGWIN",
|
||||||
|
"devbuild",
|
||||||
|
"endregion",
|
||||||
|
"Finalizer",
|
||||||
|
"Finalizers",
|
||||||
|
"globaltool",
|
||||||
|
"godotengine",
|
||||||
|
"godotpackage",
|
||||||
|
"issuecomment",
|
||||||
|
"justalemon",
|
||||||
|
"lcov",
|
||||||
|
"lihop",
|
||||||
|
"linecoverage",
|
||||||
|
"methodcoverage",
|
||||||
|
"missingall",
|
||||||
|
"msbuild",
|
||||||
|
"MSYS",
|
||||||
|
"nameof",
|
||||||
|
"Nerdbank",
|
||||||
|
"netstandard",
|
||||||
|
"NOLOGO",
|
||||||
|
"nupkg",
|
||||||
|
"Omnisharp",
|
||||||
|
"opencover",
|
||||||
|
"OPTOUT",
|
||||||
|
"paramref",
|
||||||
|
"pascalcase",
|
||||||
|
"Postinitialize",
|
||||||
|
"Predelete",
|
||||||
|
"renovatebot",
|
||||||
|
"reportgenerator",
|
||||||
|
"reporttypes",
|
||||||
|
"Shouldly",
|
||||||
|
"subfolders",
|
||||||
|
"targetargs",
|
||||||
|
"targetdir",
|
||||||
|
"tscn",
|
||||||
|
"typeof",
|
||||||
|
"typeparam",
|
||||||
|
"typeparamref",
|
||||||
|
"ulong",
|
||||||
|
"Unparented",
|
||||||
|
"Xunit"
|
||||||
|
]
|
||||||
|
}
|
||||||
49
Zennysoft.Game.Ma.Implementation/App/AppRepo.cs
Normal file
49
Zennysoft.Game.Ma.Implementation/App/AppRepo.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public class AppRepo : IAppRepo
|
||||||
|
{
|
||||||
|
public event Action? SplashScreenSkipped;
|
||||||
|
public event Action? MainMenuEntered;
|
||||||
|
public event Action? GameEntered;
|
||||||
|
public event Action? GameExited;
|
||||||
|
public event Action? DataViewerExited;
|
||||||
|
|
||||||
|
private bool _disposedValue;
|
||||||
|
|
||||||
|
public void SkipSplashScreen() => SplashScreenSkipped?.Invoke();
|
||||||
|
|
||||||
|
public void OnMainMenuEntered() => MainMenuEntered?.Invoke();
|
||||||
|
|
||||||
|
public void OnEnterGame() => GameEntered?.Invoke();
|
||||||
|
|
||||||
|
public void OnExitGame() => GameExited?.Invoke();
|
||||||
|
|
||||||
|
public void OnGameOver() => GameExited?.Invoke();
|
||||||
|
|
||||||
|
public void OnDataViewerExited() => DataViewerExited?.Invoke();
|
||||||
|
|
||||||
|
protected void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (!_disposedValue)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
// Dispose managed objects.
|
||||||
|
SplashScreenSkipped = null;
|
||||||
|
MainMenuEntered = null;
|
||||||
|
GameEntered = null;
|
||||||
|
GameExited = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
_disposedValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(disposing: true);
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public record Data
|
||||||
|
{
|
||||||
|
public bool ShouldLoadExistingGame { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
31
Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Input.cs
Normal file
31
Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Input.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public static class Input
|
||||||
|
{
|
||||||
|
public readonly record struct NewGame;
|
||||||
|
|
||||||
|
public readonly record struct LoadGame;
|
||||||
|
|
||||||
|
public readonly record struct LoadGameFinished;
|
||||||
|
|
||||||
|
public readonly record struct FadeInFinished;
|
||||||
|
|
||||||
|
public readonly record struct FadeOutFinished;
|
||||||
|
|
||||||
|
public readonly record struct QuitGame;
|
||||||
|
|
||||||
|
public readonly record struct GameOver;
|
||||||
|
|
||||||
|
public readonly record struct ShowLoadingScreen;
|
||||||
|
|
||||||
|
public readonly record struct SaveFileLoaded;
|
||||||
|
|
||||||
|
public readonly record struct EnemyViewerOpened;
|
||||||
|
|
||||||
|
public readonly record struct EnemyViewerExited;
|
||||||
|
|
||||||
|
public readonly record struct GalleryOpened;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public static class Output
|
||||||
|
{
|
||||||
|
public readonly record struct Initialize;
|
||||||
|
|
||||||
|
public readonly record struct FadeToBlack;
|
||||||
|
|
||||||
|
public readonly record struct ShowSplashScreen;
|
||||||
|
|
||||||
|
public readonly record struct HideSplashScreen;
|
||||||
|
|
||||||
|
public readonly record struct RemoveExistingGame;
|
||||||
|
|
||||||
|
public readonly record struct PlayGame;
|
||||||
|
|
||||||
|
public readonly record struct ShowGame;
|
||||||
|
|
||||||
|
public readonly record struct HideGame;
|
||||||
|
|
||||||
|
public readonly record struct SetupGameScene;
|
||||||
|
|
||||||
|
public readonly record struct ShowLoadingScreen;
|
||||||
|
|
||||||
|
public readonly record struct ShowMainMenu;
|
||||||
|
|
||||||
|
public readonly record struct CloseGame;
|
||||||
|
|
||||||
|
public readonly record struct ExitGame;
|
||||||
|
|
||||||
|
public readonly record struct GameOver;
|
||||||
|
|
||||||
|
public readonly record struct StartLoadingSaveFile;
|
||||||
|
|
||||||
|
public readonly record struct EnemyViewerOpened;
|
||||||
|
|
||||||
|
public readonly record struct EnemyViewerExited;
|
||||||
|
|
||||||
|
public readonly record struct GalleryOpened;
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Zennysoft.Game.Ma.Implementation/App/State/AppLogic.State.cs
Normal file
10
Zennysoft.Game.Ma.Implementation/App/State/AppLogic.State.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public abstract partial record State : StateLogic<State>;
|
||||||
|
}
|
||||||
13
Zennysoft.Game.Ma.Implementation/App/State/AppLogic.cs
Normal file
13
Zennysoft.Game.Ma.Implementation/App/State/AppLogic.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IAppLogic : ILogicBlock<AppLogic.State>;
|
||||||
|
|
||||||
|
[Meta]
|
||||||
|
[LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial class AppLogic : LogicBlock<AppLogic.State>, IAppLogic
|
||||||
|
{
|
||||||
|
public override Transition GetInitialState() => To<State.Initialize>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record EnemyViewer : State, IGet<Input.EnemyViewerExited>
|
||||||
|
{
|
||||||
|
public EnemyViewer()
|
||||||
|
{
|
||||||
|
|
||||||
|
this.OnEnter(() =>
|
||||||
|
{
|
||||||
|
Output(new Output.EnemyViewerOpened());
|
||||||
|
});
|
||||||
|
this.OnExit(() =>
|
||||||
|
{
|
||||||
|
Output(new Output.EnemyViewerExited());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.EnemyViewerExited input) => To<MainMenu>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record GameStarted : State, IGet<Input.QuitGame>
|
||||||
|
{
|
||||||
|
public GameStarted()
|
||||||
|
{
|
||||||
|
|
||||||
|
this.OnEnter(() =>
|
||||||
|
{
|
||||||
|
Output(new Output.SetupGameScene());
|
||||||
|
Output(new Output.ShowGame());
|
||||||
|
Get<IAppRepo>().OnEnterGame();
|
||||||
|
});
|
||||||
|
this.OnExit(() => Output(new Output.HideGame()));
|
||||||
|
|
||||||
|
OnAttach(() => Get<IAppRepo>().GameExited += OnGameExited);
|
||||||
|
OnDetach(() => Get<IAppRepo>().GameExited -= OnGameExited);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.QuitGame input)
|
||||||
|
{
|
||||||
|
Output(new Output.CloseGame());
|
||||||
|
return To<MainMenu>();
|
||||||
|
}
|
||||||
|
public void OnGameExited() => Input(new Input.QuitGame());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record Initialize : State, IGet<Input.SaveFileLoaded>
|
||||||
|
{
|
||||||
|
public Initialize()
|
||||||
|
{
|
||||||
|
this.OnEnter(() => Output(new Output.Initialize()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.SaveFileLoaded input) => To<SplashScreen>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record LeavingMenu : State, IGet<Input.FadeOutFinished>
|
||||||
|
{
|
||||||
|
public LeavingMenu()
|
||||||
|
{
|
||||||
|
this.OnEnter(() => Output(new Output.FadeToBlack()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.FadeOutFinished input) =>
|
||||||
|
Get<Data>().ShouldLoadExistingGame
|
||||||
|
? To<LoadingSaveFile>()
|
||||||
|
: To<GameStarted>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record LoadingSaveFile : State, IGet<Input.SaveFileLoaded>
|
||||||
|
{
|
||||||
|
public LoadingSaveFile()
|
||||||
|
{
|
||||||
|
this.OnEnter(() => Output(new Output.StartLoadingSaveFile()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.SaveFileLoaded input) => To<MainMenu>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record MainMenu : State, IGet<Input.NewGame>, IGet<Input.EnemyViewerOpened>, IGet<Input.QuitGame>
|
||||||
|
{
|
||||||
|
public MainMenu()
|
||||||
|
{
|
||||||
|
OnAttach(() => Output(new Output.ShowMainMenu()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.NewGame input) => To<GameStarted>();
|
||||||
|
|
||||||
|
public Transition On(in Input.EnemyViewerOpened input) => To<EnemyViewer>();
|
||||||
|
public Transition On(in Input.QuitGame input)
|
||||||
|
{
|
||||||
|
Output(new Output.ExitGame());
|
||||||
|
return ToSelf();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record SplashScreen : State, IGet<Input.FadeOutFinished>
|
||||||
|
{
|
||||||
|
public SplashScreen()
|
||||||
|
{
|
||||||
|
this.OnEnter(() => Output(new Output.ShowSplashScreen()));
|
||||||
|
|
||||||
|
OnAttach(
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
Get<IAppRepo>().SplashScreenSkipped += OnSplashScreenSkipped;
|
||||||
|
});
|
||||||
|
|
||||||
|
OnDetach(
|
||||||
|
() => Get<IAppRepo>().SplashScreenSkipped -= OnSplashScreenSkipped
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.FadeOutFinished input) => To<MainMenu>();
|
||||||
|
|
||||||
|
public void OnSplashScreenSkipped() =>
|
||||||
|
Output(new Output.HideSplashScreen());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
Zennysoft.Game.Ma.Implementation/Audio/BGMPlayer.cs
Normal file
7
Zennysoft.Game.Ma.Implementation/Audio/BGMPlayer.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
using Zennysoft.Game.Implementation;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class BGMPlayer : DimmableAudioStreamPlayer
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public enum BackgroundMusic
|
||||||
|
{
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://d2jrktp06xsba"
|
||||||
|
path="res://.godot/imported/crossing-the-gate.mp3-f062dfcb3f59739ce7e55970f8091d25.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/music/crossing-the-gate.mp3"
|
||||||
|
dest_files=["res://.godot/imported/crossing-the-gate.mp3-f062dfcb3f59739ce7e55970f8091d25.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/music/droney.mp3
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/music/droney.mp3
Normal file
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://dfu0fksb6slhx"
|
||||||
|
path="res://.godot/imported/droney.mp3-a35fe85a5df08f09cd4cf965e60dc611.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/music/droney.mp3"
|
||||||
|
dest_files=["res://.godot/imported/droney.mp3-a35fe85a5df08f09cd4cf965e60dc611.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/music/tar-winds.mp3
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/music/tar-winds.mp3
Normal file
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://dn2e2hqujlia1"
|
||||||
|
path="res://.godot/imported/tar-winds.mp3-7ac6ab80e2c96dfbcd5e5c27c1154ff2.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/music/tar-winds.mp3"
|
||||||
|
dest_files=["res://.godot/imported/tar-winds.mp3-7ac6ab80e2c96dfbcd5e5c27c1154ff2.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://6002a12ecfo5"
|
||||||
|
path="res://.godot/imported/useless immune system.wav-90ff2c5c12784f54b1b15c7a7e4603b8.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/music/useless immune system.wav"
|
||||||
|
dest_files=["res://.godot/imported/useless immune system.wav-90ff2c5c12784f54b1b15c7a7e4603b8.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Cancel.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Cancel.ogg
Normal file
Binary file not shown.
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Cancel.ogg.import
Normal file
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Cancel.ogg.import
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://dci08kmwsu6k1"
|
||||||
|
path="res://.godot/imported/Cancel.ogg-90240069a266fcef76dd638dfd79efd5.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/Cancel.ogg"
|
||||||
|
dest_files=["res://.godot/imported/Cancel.ogg-90240069a266fcef76dd638dfd79efd5.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Equip.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Equip.ogg
Normal file
Binary file not shown.
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Equip.ogg.import
Normal file
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Equip.ogg.import
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://nebh8kbv638p"
|
||||||
|
path="res://.godot/imported/Equip.ogg-217f5d9ca98d54921c4ec31e13fb9ba4.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/Equip.ogg"
|
||||||
|
dest_files=["res://.godot/imported/Equip.ogg-217f5d9ca98d54921c4ec31e13fb9ba4.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Heal.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Heal.ogg
Normal file
Binary file not shown.
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Heal.ogg.import
Normal file
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Heal.ogg.import
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://myx4s8lmarc2"
|
||||||
|
path="res://.godot/imported/Heal.ogg-05b7ed0ad880ef31e2dd13ac2428a53c.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/Heal.ogg"
|
||||||
|
dest_files=["res://.godot/imported/Heal.ogg-05b7ed0ad880ef31e2dd13ac2428a53c.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/MenuBack.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/MenuBack.ogg
Normal file
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://r1tryiit38i8"
|
||||||
|
path="res://.godot/imported/MenuBack.ogg-4d59ead9ffd1dde11bf2c91a5ade19a4.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/MenuBack.ogg"
|
||||||
|
dest_files=["res://.godot/imported/MenuBack.ogg-4d59ead9ffd1dde11bf2c91a5ade19a4.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://dor0in0x2fg48"
|
||||||
|
path="res://.godot/imported/MoveThroughOptions.ogg-d2ab68a21096bd510cf966df8d088ca2.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/MoveThroughOptions.ogg"
|
||||||
|
dest_files=["res://.godot/imported/MoveThroughOptions.ogg-d2ab68a21096bd510cf966df8d088ca2.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/PlayerAttack.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/PlayerAttack.ogg
Normal file
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://dl300ljxjccju"
|
||||||
|
path="res://.godot/imported/PlayerAttack.ogg-b72a90c320c3a6f764de2be3f71a8058.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/PlayerAttack.ogg"
|
||||||
|
dest_files=["res://.godot/imported/PlayerAttack.ogg-b72a90c320c3a6f764de2be3f71a8058.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/PlayerHitWall.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/PlayerHitWall.ogg
Normal file
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://dvv6wd7rtbc7b"
|
||||||
|
path="res://.godot/imported/PlayerHitWall.ogg-429bd11f2f509307596bb8d8ac73a08d.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/PlayerHitWall.ogg"
|
||||||
|
dest_files=["res://.godot/imported/PlayerHitWall.ogg-429bd11f2f509307596bb8d8ac73a08d.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Sort.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Sort.ogg
Normal file
Binary file not shown.
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Sort.ogg.import
Normal file
19
Zennysoft.Game.Ma.Implementation/Audio/sfx/Sort.ogg.import
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://d3sn7c614uj2n"
|
||||||
|
path="res://.godot/imported/Sort.ogg-c7758aed01332fd8ea77a27c6593a8bb.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/Sort.ogg"
|
||||||
|
dest_files=["res://.godot/imported/Sort.ogg-c7758aed01332fd8ea77a27c6593a8bb.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Unequip.ogg
Normal file
BIN
Zennysoft.Game.Ma.Implementation/Audio/sfx/Unequip.ogg
Normal file
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://bb1j3m60jns54"
|
||||||
|
path="res://.godot/imported/Unequip.ogg-b3c6ba8a77b0e6d2ec671cb12640c764.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/audio/sfx/Unequip.ogg"
|
||||||
|
dest_files=["res://.godot/imported/Unequip.ogg-b3c6ba8a77b0e6d2ec671cb12640c764.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Godot;
|
||||||
|
using Zennysoft.Ma.Adapter.Entity;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter
|
||||||
|
{
|
||||||
|
public static class DamageCalculator
|
||||||
|
{
|
||||||
|
public static int CalculateDamage(AttackData damage, double defense, ElementalResistanceSet elementalResistanceSet)
|
||||||
|
{
|
||||||
|
var calculatedDamage = damage.BaseDamage;
|
||||||
|
if (!damage.IgnoreDefense)
|
||||||
|
calculatedDamage = CalculateDefenseResistance(calculatedDamage, defense);
|
||||||
|
if (!damage.IgnoreElementalResistance)
|
||||||
|
calculatedDamage = CalculateElementalResistance(calculatedDamage, elementalResistanceSet.ElementalResistance[damage.ElementType]);
|
||||||
|
return Mathf.Max(1, calculatedDamage);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int CalculateDefenseResistance(int incomingDamage, double defense)
|
||||||
|
{
|
||||||
|
var result = incomingDamage - (int)(incomingDamage * (defense / 100));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int CalculateElementalResistance(
|
||||||
|
int incomingDamage,
|
||||||
|
double elementalResistance)
|
||||||
|
{
|
||||||
|
var result = incomingDamage - (int)(incomingDamage * (elementalResistance / 100));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
14
Zennysoft.Game.Ma.Implementation/Components/ElementType.cs
Normal file
14
Zennysoft.Game.Ma.Implementation/Components/ElementType.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public enum ElementType
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Aeolic,
|
||||||
|
Telluric,
|
||||||
|
Hydric,
|
||||||
|
Igneous,
|
||||||
|
Ferrum,
|
||||||
|
Holy,
|
||||||
|
Curse,
|
||||||
|
All
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IAttackComponent : IEntityComponent
|
||||||
|
{
|
||||||
|
public IAutoProp<int> CurrentAttack { get; }
|
||||||
|
|
||||||
|
public IAutoProp<int> MaximumAttack { get; }
|
||||||
|
|
||||||
|
public void Restore(int restoreAmount);
|
||||||
|
|
||||||
|
public void Reduce(int reduceAmount);
|
||||||
|
|
||||||
|
public void SetAttack(int attack);
|
||||||
|
|
||||||
|
public void RaiseMaximumAttack(int raiseAmount);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IDefenseComponent : IEntityComponent
|
||||||
|
{
|
||||||
|
public IAutoProp<int> CurrentDefense { get; }
|
||||||
|
|
||||||
|
public IAutoProp<int> MaximumDefense { get; }
|
||||||
|
|
||||||
|
public void Restore(int restoreAmount);
|
||||||
|
|
||||||
|
public void Reduce(int reduceAmount);
|
||||||
|
|
||||||
|
public void SetDefense(int attack);
|
||||||
|
|
||||||
|
public void RaiseMaximumDefense(int raiseAmount);
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IEntityComponent
|
||||||
|
{
|
||||||
|
public void Reset();
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
using Godot;
|
||||||
|
using Zennysoft.Ma.Adapter.Entity;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
public interface IEquipmentComponent : IEntityComponent
|
||||||
|
{
|
||||||
|
public IAutoProp<IWeapon> EquippedWeapon { get; }
|
||||||
|
|
||||||
|
public IAutoProp<IArmor> EquippedArmor { get; }
|
||||||
|
|
||||||
|
public IAutoProp<IAccessory> EquippedAccessory { get; }
|
||||||
|
|
||||||
|
public IAutoProp<IEquipableItem> EquippedAmmo { get; }
|
||||||
|
|
||||||
|
public void Equip(IEquipableItem equipable);
|
||||||
|
|
||||||
|
public void Unequip(IEquipableItem equipable);
|
||||||
|
|
||||||
|
public bool IsItemEquipped(IEquipableItem item);
|
||||||
|
|
||||||
|
public void UpdateEquipment(IEquipableItem equipable);
|
||||||
|
|
||||||
|
public bool AugmentableEquipmentExists();
|
||||||
|
|
||||||
|
public int BonusAttack { get; }
|
||||||
|
|
||||||
|
public int BonusDefense { get; }
|
||||||
|
|
||||||
|
public int BonusHP { get; }
|
||||||
|
|
||||||
|
public int BonusVT { get; }
|
||||||
|
|
||||||
|
public int BonusLuck { get; }
|
||||||
|
|
||||||
|
public ElementalResistanceSet ElementalResistance { get; }
|
||||||
|
|
||||||
|
public event Action<IEquipableItem> EquipmentChanged;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IExperiencePointsComponent : IEntityComponent
|
||||||
|
{
|
||||||
|
public IAutoProp<int> CurrentExp { get; }
|
||||||
|
|
||||||
|
public IAutoProp<int> ExpToNextLevel { get; }
|
||||||
|
|
||||||
|
public IAutoProp<double> ExpGainRate { get; }
|
||||||
|
|
||||||
|
public IAutoProp<int> Level { get; }
|
||||||
|
|
||||||
|
public void ModifyExpGainRate(double newRate);
|
||||||
|
|
||||||
|
public void Gain(int baseExpGain);
|
||||||
|
|
||||||
|
public void GainUnmodified(int flateRateExpGain);
|
||||||
|
|
||||||
|
public void LevelUp();
|
||||||
|
|
||||||
|
public event Action PlayerLevelUp;
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IHealthComponent : IEntityComponent
|
||||||
|
{
|
||||||
|
public IAutoProp<int> CurrentHP { get; }
|
||||||
|
|
||||||
|
public IAutoProp<int> MaximumHP { get; }
|
||||||
|
|
||||||
|
public event Action? HealthReachedZero;
|
||||||
|
public event Action? DamageTaken;
|
||||||
|
|
||||||
|
public bool AtFullHealth { get; }
|
||||||
|
|
||||||
|
public void Heal(int healAmount);
|
||||||
|
|
||||||
|
public void Damage(int damageAmount);
|
||||||
|
|
||||||
|
public void SetCurrentHealth(int health);
|
||||||
|
|
||||||
|
public void SetMaximumHealth(int health);
|
||||||
|
|
||||||
|
public void RaiseMaximumHP(int raiseAmount, bool restoreHP = false);
|
||||||
|
}
|
||||||
10
Zennysoft.Game.Ma.Implementation/Components/LuckComponent.cs
Normal file
10
Zennysoft.Game.Ma.Implementation/Components/LuckComponent.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface ILuckComponent : IEntityComponent
|
||||||
|
{
|
||||||
|
public IAutoProp<int> Luck { get; }
|
||||||
|
|
||||||
|
public void IncreaseLuck(int value);
|
||||||
|
}
|
||||||
22
Zennysoft.Game.Ma.Implementation/Components/VTComponent.cs
Normal file
22
Zennysoft.Game.Ma.Implementation/Components/VTComponent.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IVTComponent : IEntityComponent
|
||||||
|
{
|
||||||
|
public IAutoProp<int> CurrentVT { get; }
|
||||||
|
|
||||||
|
public IAutoProp<int> MaximumVT { get; }
|
||||||
|
|
||||||
|
public bool AtFullVT { get; }
|
||||||
|
|
||||||
|
public void Restore(int restoreAmount);
|
||||||
|
|
||||||
|
public void Reduce(int reduceAmount);
|
||||||
|
|
||||||
|
public void SetVT(int vt);
|
||||||
|
|
||||||
|
public void RaiseMaximumVT(int raiseAmount, bool restoreVT = true);
|
||||||
|
|
||||||
|
public void SetMaximumVT(int vt);
|
||||||
|
}
|
||||||
3
Zennysoft.Game.Ma.Implementation/Entity/AttackData.cs
Normal file
3
Zennysoft.Game.Ma.Implementation/Entity/AttackData.cs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public record AttackData(int BaseDamage, ElementType ElementType, bool IgnoreDefense = false, bool IgnoreElementalResistance = false);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://ci7va4hsq6hyt
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://87d8kluait8y
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://c7e5g8l6wuph"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://87d8kluait8y" path="res://src/enemy/behaviors/PatrolBehavior.cs" id="1_lobva"]
|
||||||
|
|
||||||
|
[node name="NavigationAgent" type="NavigationAgent3D"]
|
||||||
|
avoidance_enabled = true
|
||||||
|
debug_enabled = true
|
||||||
|
script = ExtResource("1_lobva")
|
||||||
|
_patrolSpeed = 100.0
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using Chickensoft.Serialization;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter.Entity
|
||||||
|
{
|
||||||
|
public record ElementalResistanceSet
|
||||||
|
{
|
||||||
|
[Save("elemental_resist_set")]
|
||||||
|
public Dictionary<ElementType, double> ElementalResistance { get; }
|
||||||
|
|
||||||
|
public static ElementalResistanceSet None => new ElementalResistanceSet(0, 0, 0, 0, 0, 0, 0);
|
||||||
|
|
||||||
|
public ElementalResistanceSet(double aeolicResistance, double hydricResistance, double igneousResistance, double ferrumResistance, double telluricResistance, double holyResistance, double curseResistance)
|
||||||
|
{
|
||||||
|
ElementalResistance = new Dictionary<ElementType, double>
|
||||||
|
{
|
||||||
|
{ ElementType.None, 0 },
|
||||||
|
{ ElementType.Aeolic, aeolicResistance },
|
||||||
|
{ ElementType.Hydric, hydricResistance },
|
||||||
|
{ ElementType.Igneous, igneousResistance },
|
||||||
|
{ ElementType.Ferrum, ferrumResistance },
|
||||||
|
{ ElementType.Telluric, telluricResistance },
|
||||||
|
{ ElementType.Holy, holyResistance },
|
||||||
|
{ ElementType.Curse, curseResistance },
|
||||||
|
{ ElementType.All, aeolicResistance + hydricResistance + igneousResistance + ferrumResistance + telluricResistance + holyResistance + curseResistance },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ElementalResistanceSet operator +(ElementalResistanceSet left, ElementalResistanceSet right)
|
||||||
|
{
|
||||||
|
return new ElementalResistanceSet(
|
||||||
|
left.ElementalResistance[ElementType.Aeolic] + right.ElementalResistance[ElementType.Aeolic],
|
||||||
|
left.ElementalResistance[ElementType.Hydric] + right.ElementalResistance[ElementType.Hydric],
|
||||||
|
left.ElementalResistance[ElementType.Igneous] + right.ElementalResistance[ElementType.Igneous],
|
||||||
|
left.ElementalResistance[ElementType.Ferrum] + right.ElementalResistance[ElementType.Ferrum],
|
||||||
|
left.ElementalResistance[ElementType.Telluric] + right.ElementalResistance[ElementType.Telluric],
|
||||||
|
left.ElementalResistance[ElementType.Holy] + right.ElementalResistance[ElementType.Holy],
|
||||||
|
left.ElementalResistance[ElementType.Curse] + right.ElementalResistance[ElementType.Curse]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
42
Zennysoft.Game.Ma.Implementation/Entity/IEnemy.cs
Normal file
42
Zennysoft.Game.Ma.Implementation/Entity/IEnemy.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
|
using Godot;
|
||||||
|
using System.Collections.Immutable;
|
||||||
|
using Zennysoft.Game.Ma;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter.Entity
|
||||||
|
{
|
||||||
|
public interface IEnemy : ICharacterBody3D
|
||||||
|
{
|
||||||
|
public void Activate();
|
||||||
|
|
||||||
|
public void Idle();
|
||||||
|
|
||||||
|
public void Die();
|
||||||
|
|
||||||
|
public void PerformAction();
|
||||||
|
|
||||||
|
public void ReturnToDefaultState();
|
||||||
|
|
||||||
|
public void OnAbsorb();
|
||||||
|
|
||||||
|
public void OnMorph();
|
||||||
|
|
||||||
|
public IDungeonRoom GetCurrentRoom(ImmutableList<IDungeonRoom> dungeonRooms);
|
||||||
|
|
||||||
|
public void MoveEnemyToNewRoom(IDungeonRoom newRoom);
|
||||||
|
|
||||||
|
public IHealthComponent HealthComponent { get; }
|
||||||
|
|
||||||
|
public IAttackComponent AttackComponent { get; }
|
||||||
|
|
||||||
|
public IDefenseComponent DefenseComponent { get; }
|
||||||
|
|
||||||
|
public ElementalResistanceSet ElementalResistanceSet { get; }
|
||||||
|
|
||||||
|
public int InitialHP { get; }
|
||||||
|
|
||||||
|
public int InitialAttack { get; }
|
||||||
|
|
||||||
|
public int InitialDefense { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter.Entity
|
||||||
|
{
|
||||||
|
public interface IKnockbackable
|
||||||
|
{
|
||||||
|
void Knockback(float impulse, Vector3 direction);
|
||||||
|
}
|
||||||
|
}
|
||||||
167
Zennysoft.Game.Ma.Implementation/Equipment/Augment.cs
Normal file
167
Zennysoft.Game.Ma.Implementation/Equipment/Augment.cs
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
using Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public class Augment
|
||||||
|
{
|
||||||
|
public JewelTags AugmentTag;
|
||||||
|
|
||||||
|
public Augment(JewelTags tag, IAugmentType augment)
|
||||||
|
{
|
||||||
|
AugmentTag = tag;
|
||||||
|
AugmentType = augment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IAugmentType AugmentType { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class HPRecoverySpeedAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public HPRecoverySpeedAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply() => _player.HealthTimerHPRate += 2;
|
||||||
|
|
||||||
|
public void Remove() => _player.HealthTimerHPRate -= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BasicAugment : IAugmentType
|
||||||
|
{
|
||||||
|
public void Apply()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove()
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class HastenVTAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public HastenVTAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply() => _player.ModifyHealthTimerSpeed(_player.HealthTimerSpeedModifier + 0.25f);
|
||||||
|
|
||||||
|
public void Remove() => _player.ModifyHealthTimerSpeed(_player.HealthTimerSpeedModifier - 0.25f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SlowVTReductionAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public SlowVTReductionAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply() => _player.ModifyHealthTimerSpeed(_player.HealthTimerSpeedModifier - 0.25f);
|
||||||
|
|
||||||
|
public void Remove() => _player.ModifyHealthTimerSpeed(_player.HealthTimerSpeedModifier + 0.25f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IncreaseEXPRateAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public IncreaseEXPRateAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply() => _player.ExperiencePointsComponent.ModifyExpGainRate(_player.ExperiencePointsComponent.ExpGainRate.Value + 0.25f);
|
||||||
|
public void Remove() => _player.ExperiencePointsComponent.ModifyExpGainRate(_player.ExperiencePointsComponent.ExpGainRate.Value - 0.25f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class LowerEXPRateAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public LowerEXPRateAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply() => _player.ExperiencePointsComponent.ModifyExpGainRate(_player.ExperiencePointsComponent.ExpGainRate.Value - 0.25f);
|
||||||
|
public void Remove() => _player.ExperiencePointsComponent.ModifyExpGainRate(_player.ExperiencePointsComponent.ExpGainRate.Value + 0.25f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class LowerHPRecoveryAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public LowerHPRecoveryAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply() => _player.HealthTimerHPRate -= 1;
|
||||||
|
public void Remove() => _player.HealthTimerHPRate += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class IdentifyAllItemsAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public IdentifyAllItemsAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply()
|
||||||
|
{
|
||||||
|
_player.AutoIdentifyItems = true;
|
||||||
|
foreach (var item in _player.Inventory.Items.ToList())
|
||||||
|
{
|
||||||
|
if (item.ItemTag == ItemTag.MysteryItem)
|
||||||
|
_player.IdentifyItem(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove()
|
||||||
|
{
|
||||||
|
var weaponAugment = _player.EquipmentComponent.EquippedWeapon.Value.Augment;
|
||||||
|
var armorAugment = _player.EquipmentComponent.EquippedArmor.Value.Augment;
|
||||||
|
var accessoryAugment = _player.EquipmentComponent.EquippedAccessory.Value.Augment;
|
||||||
|
var augments = new List<Augment?>() { weaponAugment, armorAugment, accessoryAugment };
|
||||||
|
if (augments.Count(x => x != null && x.AugmentTag == JewelTags.AutoIdentifyAllItems) > 1)
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
_player.AutoIdentifyItems = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class RevivePlayerAugment : IAugmentType
|
||||||
|
{
|
||||||
|
private readonly IPlayer _player;
|
||||||
|
|
||||||
|
public RevivePlayerAugment(IPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply()
|
||||||
|
{
|
||||||
|
_player.AutoRevive = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove()
|
||||||
|
{
|
||||||
|
var weaponAugment = _player.EquipmentComponent.EquippedWeapon.Value.Augment;
|
||||||
|
var armorAugment = _player.EquipmentComponent.EquippedArmor.Value.Augment;
|
||||||
|
var accessoryAugment = _player.EquipmentComponent.EquippedAccessory.Value.Augment;
|
||||||
|
var augments = new List<Augment?>() { weaponAugment, armorAugment, accessoryAugment };
|
||||||
|
if (augments.Count(x => x != null && x.AugmentTag == JewelTags.ReviveUserOnce) > 1)
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
_player.AutoRevive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
public interface IAugmentType
|
||||||
|
{
|
||||||
|
void Apply();
|
||||||
|
|
||||||
|
void Remove();
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public enum AccessoryTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
HalfVTConsumption,
|
||||||
|
StatusEffectImmunity
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public enum BoxItemTag
|
||||||
|
{
|
||||||
|
RandomNewItem,
|
||||||
|
}
|
||||||
24
Zennysoft.Game.Ma.Implementation/Equipment/Tags/ItemTag.cs
Normal file
24
Zennysoft.Game.Ma.Implementation/Equipment/Tags/ItemTag.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public enum ItemTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
BreaksOnChange,
|
||||||
|
MysteryItem,
|
||||||
|
DamagesPlayer,
|
||||||
|
ContainsRestorative,
|
||||||
|
ContainsWeapon,
|
||||||
|
ContainsArmor,
|
||||||
|
ContainsBox,
|
||||||
|
RandomSpell,
|
||||||
|
ContainsAccessory,
|
||||||
|
DropTo1HPAndGainRareItem,
|
||||||
|
TradeOneRandomItem,
|
||||||
|
TradeAllRandomItems,
|
||||||
|
ContainsUnobtainedItem,
|
||||||
|
ContainsBasicItem,
|
||||||
|
RestrictUnequip,
|
||||||
|
UnequipAllItems,
|
||||||
|
EjectAllItems,
|
||||||
|
UseAllItems
|
||||||
|
}
|
||||||
21
Zennysoft.Game.Ma.Implementation/Equipment/Tags/JewelTags.cs
Normal file
21
Zennysoft.Game.Ma.Implementation/Equipment/Tags/JewelTags.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
public enum JewelTags
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
AeolicElement,
|
||||||
|
IncreaseHPRecovery,
|
||||||
|
HastenVT,
|
||||||
|
LowerEXPGain,
|
||||||
|
Glue,
|
||||||
|
ItemRescue,
|
||||||
|
HydricElement,
|
||||||
|
IgneousElement,
|
||||||
|
IncreaseEXPGain,
|
||||||
|
LowerHPRecovery,
|
||||||
|
SlowVTReduction,
|
||||||
|
AutoIdentifyAllItems,
|
||||||
|
ReviveUserOnce,
|
||||||
|
TelluricElement,
|
||||||
|
IncreaseAtkDefLuck,
|
||||||
|
IncreaseLuck
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public enum UsableItemTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
IdentifyAllItemsCostHP,
|
||||||
|
BriefImmunity,
|
||||||
|
SwapHPAndVT,
|
||||||
|
TeleportAllEnemiesToRoom,
|
||||||
|
TurnAllEnemiesIntoHealingItem,
|
||||||
|
KillHalfEnemiesInRoom,
|
||||||
|
AbsorbHPFromAllEnemiesInRoom,
|
||||||
|
HealsAllInRoomToMaxHP,
|
||||||
|
DealElementalDamageToAllEnemiesInRoom,
|
||||||
|
RaiseCurrentWeaponAttack,
|
||||||
|
RaiseCurrentDefenseArmor,
|
||||||
|
RaiseLevel,
|
||||||
|
RandomEffect,
|
||||||
|
DoubleExp,
|
||||||
|
LowerTargetTo1HP,
|
||||||
|
CanChangeAffinity,
|
||||||
|
TeleportToRandomLocation,
|
||||||
|
WarpToExitIfFound
|
||||||
|
}
|
||||||
18
Zennysoft.Game.Ma.Implementation/Equipment/Tags/WeaponTag.cs
Normal file
18
Zennysoft.Game.Ma.Implementation/Equipment/Tags/WeaponTag.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public enum WeaponTag
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
SelfDamage,
|
||||||
|
IgnoreAffinity,
|
||||||
|
IgnoreDefense,
|
||||||
|
Knockback,
|
||||||
|
InverseHPAttackPower,
|
||||||
|
RustChanceSelfAndEnemy,
|
||||||
|
Instakill,
|
||||||
|
DegradeOnSwing,
|
||||||
|
DoubleAttack,
|
||||||
|
TripleAttack,
|
||||||
|
ElementalProjectile,
|
||||||
|
KineticProjectile
|
||||||
|
}
|
||||||
185
Zennysoft.Game.Ma.Implementation/Game/GameRepo.cs
Normal file
185
Zennysoft.Game.Ma.Implementation/Game/GameRepo.cs
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
using Chickensoft.Collections;
|
||||||
|
using Godot;
|
||||||
|
using Zennysoft.Game.Abstractions;
|
||||||
|
using Zennysoft.Game.Implementation;
|
||||||
|
using Zennysoft.Ma.Adapter.Entity;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IGameRepo : IDisposable
|
||||||
|
{
|
||||||
|
event Action? Ended;
|
||||||
|
|
||||||
|
event Action? CloseInventoryEvent;
|
||||||
|
|
||||||
|
event Action<string>? AnnounceMessageOnMainScreenEvent;
|
||||||
|
|
||||||
|
event Action<string>? AnnounceMessageInInventoryEvent;
|
||||||
|
|
||||||
|
event Action<int>? DoubleExpTimeStart;
|
||||||
|
|
||||||
|
event Action? DoubleExpTimeEnd;
|
||||||
|
|
||||||
|
event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
|
||||||
|
|
||||||
|
event Action? PlayerAttack;
|
||||||
|
|
||||||
|
event Action? PlayerAttackedWall;
|
||||||
|
|
||||||
|
event Action? PlayerAttackedEnemy;
|
||||||
|
|
||||||
|
event Action<IEquipableItem>? EquippedItem;
|
||||||
|
|
||||||
|
event Action<IEquipableItem>? UnequippedItem;
|
||||||
|
|
||||||
|
event Action<IEnemy>? EnemyDied;
|
||||||
|
|
||||||
|
void Pause();
|
||||||
|
|
||||||
|
void Resume();
|
||||||
|
|
||||||
|
IAutoProp<bool> IsPaused { get; }
|
||||||
|
|
||||||
|
public void StartDoubleEXP(TimeSpan lengthOfEffect);
|
||||||
|
|
||||||
|
public void EndDoubleExp();
|
||||||
|
|
||||||
|
public void AnnounceMessageOnMainScreen(string message);
|
||||||
|
|
||||||
|
public void AnnounceMessageInInventory(string message);
|
||||||
|
|
||||||
|
public void RemoveItemFromInventory(IBaseInventoryItem item);
|
||||||
|
|
||||||
|
public void OnPlayerAttack();
|
||||||
|
|
||||||
|
public void OnPlayerAttackedWall();
|
||||||
|
|
||||||
|
public void CloseInventory();
|
||||||
|
|
||||||
|
public void GameEnded();
|
||||||
|
|
||||||
|
public void OnEquippedItem(IEquipableItem item);
|
||||||
|
|
||||||
|
public void OnUnequippedItem(IEquipableItem item);
|
||||||
|
|
||||||
|
public void OnEnemyDied(IEnemy enemy);
|
||||||
|
|
||||||
|
public double ExpRate { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GameRepo : IGameRepo
|
||||||
|
{
|
||||||
|
public event Action? Ended;
|
||||||
|
public event Action? CloseInventoryEvent;
|
||||||
|
public event Action<string>? AnnounceMessageOnMainScreenEvent;
|
||||||
|
public event Action<string>? AnnounceMessageInInventoryEvent;
|
||||||
|
public event Action<int>? DoubleExpTimeStart;
|
||||||
|
public event Action? DoubleExpTimeEnd;
|
||||||
|
public event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
|
||||||
|
public event Action? PlayerAttack;
|
||||||
|
public event Action? PlayerAttackedWall;
|
||||||
|
public event Action? PlayerAttackedEnemy;
|
||||||
|
public event Action<IEquipableItem>? EquippedItem;
|
||||||
|
public event Action<IEquipableItem>? UnequippedItem;
|
||||||
|
public event Action<IEnemy>? EnemyDied;
|
||||||
|
public IAutoProp<bool> IsPaused => _isPaused;
|
||||||
|
private readonly AutoProp<bool> _isPaused;
|
||||||
|
|
||||||
|
public double ExpRate { get; private set; }
|
||||||
|
|
||||||
|
private bool _disposedValue;
|
||||||
|
|
||||||
|
public GameRepo()
|
||||||
|
{
|
||||||
|
_isPaused = new AutoProp<bool>(true);
|
||||||
|
ExpRate = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Pause()
|
||||||
|
{
|
||||||
|
_isPaused.OnNext(true);
|
||||||
|
GD.Print("Paused");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Resume()
|
||||||
|
{
|
||||||
|
_isPaused.OnNext(false);
|
||||||
|
GD.Print("Resume");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartDoubleEXP(TimeSpan lengthOfEffect)
|
||||||
|
{
|
||||||
|
AnnounceMessageInInventory("Experience points temporarily doubled.");
|
||||||
|
DoubleExpTimeStart?.Invoke(lengthOfEffect.Seconds);
|
||||||
|
ExpRate *= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EndDoubleExp()
|
||||||
|
{
|
||||||
|
AnnounceMessageOnMainScreen("Experience points effect wore off.");
|
||||||
|
DoubleExpTimeEnd?.Invoke();
|
||||||
|
ExpRate /= 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AnnounceMessageOnMainScreen(string message)
|
||||||
|
{
|
||||||
|
AnnounceMessageOnMainScreenEvent?.Invoke(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AnnounceMessageInInventory(string message)
|
||||||
|
{
|
||||||
|
AnnounceMessageInInventoryEvent?.Invoke(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveItemFromInventory(IBaseInventoryItem item)
|
||||||
|
{
|
||||||
|
RemoveItemFromInventoryEvent?.Invoke(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPlayerAttack()
|
||||||
|
{
|
||||||
|
PlayerAttack?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPlayerAttackedWall()
|
||||||
|
{
|
||||||
|
PlayerAttackedWall?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CloseInventory()
|
||||||
|
{
|
||||||
|
CloseInventoryEvent?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnEquippedItem(IEquipableItem item) => EquippedItem?.Invoke(item);
|
||||||
|
|
||||||
|
public void OnUnequippedItem(IEquipableItem item) => UnequippedItem?.Invoke(item);
|
||||||
|
|
||||||
|
public void OnEnemyDied(IEnemy enemy) => EnemyDied?.Invoke(enemy);
|
||||||
|
|
||||||
|
public void GameEnded()
|
||||||
|
{
|
||||||
|
Pause();
|
||||||
|
Ended?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (!_disposedValue)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
_isPaused.OnCompleted();
|
||||||
|
_isPaused.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
_disposedValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(disposing: true);
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
13
Zennysoft.Game.Ma.Implementation/Game/GameState.cs
Normal file
13
Zennysoft.Game.Ma.Implementation/Game/GameState.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IGameState : ILogicBlock<GameState.State>;
|
||||||
|
|
||||||
|
[Meta]
|
||||||
|
[LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial class GameState : LogicBlock<GameState.State>, IGameState
|
||||||
|
{
|
||||||
|
public override Transition GetInitialState() => To<State.InGame>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public static class Input
|
||||||
|
{
|
||||||
|
public readonly record struct NewGame;
|
||||||
|
|
||||||
|
public readonly record struct LoadGame;
|
||||||
|
|
||||||
|
public readonly record struct ExitGame;
|
||||||
|
|
||||||
|
public readonly record struct LoadNextFloor;
|
||||||
|
|
||||||
|
public readonly record struct InventoryButtonPressed;
|
||||||
|
|
||||||
|
public readonly record struct InteractButtonPressed;
|
||||||
|
|
||||||
|
public readonly record struct PauseButtonPressed;
|
||||||
|
|
||||||
|
public readonly record struct DebugButtonPressed;
|
||||||
|
|
||||||
|
public readonly record struct FloorExitEntered;
|
||||||
|
|
||||||
|
public readonly record struct AskForTeleport;
|
||||||
|
|
||||||
|
public readonly record struct UseTeleport;
|
||||||
|
|
||||||
|
public readonly record struct CloseTeleport;
|
||||||
|
|
||||||
|
public readonly record struct CloseInventory;
|
||||||
|
|
||||||
|
public readonly record struct GameOver;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public static class Output
|
||||||
|
{
|
||||||
|
public readonly record struct InitializeGame;
|
||||||
|
|
||||||
|
public readonly record struct ExitGame;
|
||||||
|
|
||||||
|
public readonly record struct LoadGameFromFile;
|
||||||
|
|
||||||
|
public readonly record struct OpenInventoryMenu;
|
||||||
|
|
||||||
|
public readonly record struct CloseInventoryMenu;
|
||||||
|
|
||||||
|
public readonly record struct OpenPauseScreen;
|
||||||
|
|
||||||
|
public readonly record struct ClosePauseScreen;
|
||||||
|
|
||||||
|
public readonly record struct LoadNextFloor;
|
||||||
|
|
||||||
|
public readonly record struct OpenTeleportScreen;
|
||||||
|
|
||||||
|
public readonly record struct OpenFloorExitScreen;
|
||||||
|
|
||||||
|
public readonly record struct OpenDebugMenu;
|
||||||
|
|
||||||
|
public readonly record struct CloseDebugMenu;
|
||||||
|
|
||||||
|
public readonly record struct GameOver;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public abstract partial record State : StateLogic<State>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial record AskForTeleportScreen : State, IGet<Input.UseTeleport>, IGet<Input.CloseTeleport>
|
||||||
|
{
|
||||||
|
public AskForTeleportScreen()
|
||||||
|
{
|
||||||
|
OnAttach(() => Get<IGameRepo>().Pause());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.UseTeleport input)
|
||||||
|
{
|
||||||
|
Output(new Output.OpenFloorExitScreen());
|
||||||
|
return To<FloorExitScreen>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.CloseTeleport input)
|
||||||
|
{
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial record DebugMenu : InGame, IGet<Input.DebugButtonPressed>
|
||||||
|
{
|
||||||
|
public Transition On(in Input.DebugButtonPressed input)
|
||||||
|
{
|
||||||
|
Output(new Output.CloseDebugMenu());
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial record FloorExitScreen : State, IGet<Input.LoadNextFloor>
|
||||||
|
{
|
||||||
|
public FloorExitScreen()
|
||||||
|
{
|
||||||
|
OnAttach(() => Get<IGameRepo>().Pause());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.LoadNextFloor input)
|
||||||
|
{
|
||||||
|
Output(new Output.LoadNextFloor());
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial record GameOver : InGame, IGet<Input.NewGame>, IGet<Input.ExitGame>
|
||||||
|
{
|
||||||
|
public Transition On(in Input.NewGame input)
|
||||||
|
{
|
||||||
|
Output(new Output.InitializeGame());
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.ExitGame input)
|
||||||
|
{
|
||||||
|
Output(new Output.ClosePauseScreen());
|
||||||
|
Output(new Output.ExitGame());
|
||||||
|
return To<State>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial record InGame : State,
|
||||||
|
IGet<Input.InventoryButtonPressed>,
|
||||||
|
IGet<Input.PauseButtonPressed>,
|
||||||
|
IGet<Input.DebugButtonPressed>,
|
||||||
|
IGet<Input.FloorExitEntered>,
|
||||||
|
IGet<Input.GameOver>
|
||||||
|
{
|
||||||
|
public Transition On(in Input.InventoryButtonPressed input)
|
||||||
|
{
|
||||||
|
Output(new Output.OpenInventoryMenu());
|
||||||
|
return To<InventoryScreen>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.PauseButtonPressed input)
|
||||||
|
{
|
||||||
|
Output(new Output.OpenPauseScreen());
|
||||||
|
return To<PauseScreen>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.DebugButtonPressed input)
|
||||||
|
{
|
||||||
|
Output(new Output.OpenDebugMenu());
|
||||||
|
return To<DebugMenu>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.FloorExitEntered input)
|
||||||
|
{
|
||||||
|
Output(new Output.OpenTeleportScreen());
|
||||||
|
return To<AskForTeleportScreen>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.GameOver input)
|
||||||
|
{
|
||||||
|
Output(new Output.GameOver());
|
||||||
|
return To<GameOver>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial record InventoryScreen : State, IGet<Input.InteractButtonPressed>, IGet<Input.CloseInventory>
|
||||||
|
{
|
||||||
|
public Transition On(in Input.InteractButtonPressed input)
|
||||||
|
{
|
||||||
|
Output(new Output.CloseInventoryMenu());
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.CloseInventory input)
|
||||||
|
{
|
||||||
|
Output(new Output.CloseInventoryMenu());
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
using static Zennysoft.Ma.Adapter.GameState.Output;
|
||||||
|
|
||||||
|
namespace Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public partial class GameState
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||||
|
public partial record PauseScreen : State, IGet<Input.PauseButtonPressed>, IGet<Input.ExitGame>
|
||||||
|
{
|
||||||
|
public Transition On(in Input.PauseButtonPressed input)
|
||||||
|
{
|
||||||
|
Output(new Output.ClosePauseScreen());
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.ExitGame input)
|
||||||
|
{
|
||||||
|
Output(new Output.ClosePauseScreen());
|
||||||
|
Output(new Output.ExitGame());
|
||||||
|
return To<State>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
5
Zennysoft.Game.Ma.Implementation/Item/IAccessory.cs
Normal file
5
Zennysoft.Game.Ma.Implementation/Item/IAccessory.cs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
using Zennysoft.Ma.Adapter;
|
||||||
|
|
||||||
|
public interface IAccessory : IEquipableItem, IAugmentableItem
|
||||||
|
{
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user