Compare commits

...

54 Commits

Author SHA1 Message Date
Florian Rival
50d7bec375 Bump newIDE version 2021-10-25 15:30:31 +01:00
Clément Pasteau
0c85e9bf30 Prevent sending session hits if the session is not correctly created 2021-10-25 15:58:30 +02:00
github-actions[bot]
08c41ece71 Update translations (#3197) 2021-10-25 14:27:17 +01:00
Aurélien Vivet
bd9fffba3f Remove unused test games from GDevelop 4 (#3192)
Don't show in changelog
2021-10-24 19:22:31 +01:00
github-actions[bot]
413caf6f62 Update translations (#3182) 2021-10-22 22:15:43 +01:00
Aurélien Vivet
530d0baffe Remove beta term from the docs (#3187)
Don't show in changelog
2021-10-22 22:13:14 +01:00
Aurélien Vivet
e78d2c6962 Add automation to automatically close stale issues (#3184)
Only show in developer changelog
2021-10-22 11:26:31 +01:00
Arthur Pacaud
bc606ed1be Add a console to the games debugger (#2770)
* When launching the Debugger to inspect a game, open the Console to see internal messages sent by the game, JavaScript code or the game engine.
* This is an advanced feature that is useful to find issues in your game or to see if your game is displaying any internal error.
2021-10-21 19:47:28 +01:00
Clément Pasteau
c705f89de8 Feature/external layout options (#3178)
Improve scene selection and help text for an external layout
2021-10-21 14:18:44 +02:00
github-actions[bot]
3b73b5eb6d Update translations 2021-10-21 12:40:29 +01:00
D8H
107410f0a4 Improve typing and simplify implementation of Linked Objects' getObjectsLinkedWith function (#3180)
Only show in developer changelog
2021-10-21 09:42:34 +01:00
D8H
b7b95d5e09 Add new tests for the platformer engine to prepare for the upcoming changes (#3176)
Only show in developer changelog
2021-10-20 15:40:01 +02:00
AlexandreS
a470e9b86c Fixes an issue with ghost instances of behaviors (light obstacle and pathfinder obstacle) 2021-10-20 10:45:01 +02:00
Clément Pasteau
cf5c8ae631 Improve Expression autocomplete for functions 2021-10-18 13:22:01 +02:00
AlexandreS
8f8ac2fd1e Show index of current focused result in Event Sheet 2021-10-15 09:34:48 +02:00
Clément Pasteau
cdac70425e Prevent debugger server being launched twice, causing a crash
Do not show in changelog
2021-10-14 16:58:46 +02:00
AlexandreS
378f0a48ad Add possibility to search in events sentences
* Better highlight of search results
* Remove highlights when closing the search panel
2021-10-14 15:52:30 +02:00
Clément Pasteau
e653639366 Improve Expression autocomplete (#3167)
Improve Expression Autocomplete to be more intuitive
2021-10-14 15:08:18 +02:00
Florian Rival
e105d4c9f6 Disable history when publishing the web-app to GitHub pages
Don't show in changelog
2021-10-11 16:43:33 +01:00
Florian Rival
5b80bed305 Fix crash happening when modifying "dead" instances after removing a layer and instances that were on it
Fix #3164
2021-10-11 16:39:35 +01:00
AlexandreS
a4ac323e63 Only show the operators that can be actually used in actions/conditions for strings (#3156)
* For strings/texts, only = and ≠ can be used for comparisons, and "set to"/"add to" for modifications.
2021-10-08 17:14:02 +01:00
Clément Pasteau
bc23d6a084 Fix effects being applied multiple times on objects when creating and destroying a lot of them (#3149)
* Effects from destroyed objects could be cleaned incorrectly and applied to new objects, creating glitches on newly created objects.
2021-10-08 16:14:23 +01:00
Florian Rival
2c24359fba Skip CI for Pull Request automatically open to update translations
We can always remove this tag before merging. This is to avoid doubling the usage of Travis/Semaphore CIs at every commit on master.

Don't show in changelog
2021-10-08 11:48:32 +01:00
Clément Pasteau
a6b01fc01d Add conditions for mouse key pressed from text 2021-10-08 12:15:35 +02:00
github-actions[bot]
44b81f52ea Update translations (#3154)
Co-authored-by: 4ian <4ian@users.noreply.github.com>
2021-10-07 23:06:41 +01:00
Florian Rival
cfdf13538e Automate update of translations (#3153)
* Automatically download and build latest translations from Crowdin at each commit on master, opening a PR with the changes (if any).
2021-10-07 22:58:50 +01:00
Florian Rival
7ee38a50bf Fix translations
Launched npm run compile-translations *after* launching npm run extract-all-translations, so that the English .po file was up-to-date to avoid missing translations in English language.

Don't show in changelog
2021-10-07 19:28:01 +01:00
Florian Rival
e2b8620b83 Fix translations
Don't show in changelog
2021-10-07 17:18:57 +01:00
AlexandreS
7ed8660edc Fix translations - Don't show in changelog 2021-10-07 18:10:18 +02:00
AlexandreS
75cc70368c Bump newIDE version and update translations 2021-10-07 16:38:19 +02:00
AlexandreS
0d3dfe5cf4 Display another user's profile when clicking their badge 2021-10-07 15:57:49 +02:00
Clément Pasteau
e7aa75bcd7 Add possibility to change one's email with confirmation 2021-10-07 13:28:44 +02:00
Clément Pasteau
c5ad127e83 Fix opening up the parameters dialog for object or behaviors expressions having no parameters 2021-10-07 12:28:27 +02:00
Clément Pasteau
acfdebfc0f Prevent calling a user update on every authState change
This fixes a race condition where the fetchUser would be called too early, causing a conflict with the signup function while creating the user in the database.

Do not show in changelog
2021-10-06 12:15:56 +02:00
Leo_Red
d3f8b410b0 Fix wording of "empty game" to "empty project" for consistency (#3136) 2021-10-06 09:04:53 +01:00
Florian Rival
4b7d67ce97 Fix very long object names overflowing or messing up some dialogs in the editor 2021-10-05 23:46:08 +01:00
Florian Rival
46a81ef4be Fix icons aligment and text ellipsis for long resource names in resources selector 2021-10-05 23:46:08 +01:00
Florian Rival
fe2812b8e8 Update caching by service worker of libGD.js/wasm
Don't show in changelog
2021-10-05 23:46:08 +01:00
Clément Pasteau
042cf49b3b Allow user to verify their email (#3132)
Allow users to verify their email
2021-10-05 18:23:29 +02:00
Florian Rival
7cf334ad1c Fix Edit My Profile and Logout buttons not working anymore
This was because of a stale "state" used by React. Fix by using the functional version of setState.

Also fix some Flow types that are not stricts.

Don't show in changelog
2021-10-04 17:47:10 +01:00
AlexandreS
f999bee387 Fix loss of user login between IDE refreshes 2021-10-04 17:09:43 +02:00
AlexandreS
0627d4b865 Show user's bio on My Profile window 2021-10-04 16:12:22 +02:00
Clément Pasteau
92e6a5e67f Improve user autocomplete (#3129)
Prevent saving projects and extensions with non-existing authors
2021-10-04 11:44:40 +02:00
Aurélien Vivet
d980400c2b Add "FontSize" expression for Text objects (#2974) 2021-10-03 15:50:30 +01:00
MechanicalPen
e235694fac Fix conditions comparing Dialogue Tree variables to work even if the dialogue is not running (#3127) 2021-10-03 12:07:33 +01:00
AlexandreS
cdf00d10f1 Give possibility to enter one's bio 2021-10-01 17:07:40 +02:00
Clément Pasteau
218520b836 Update translations (#3124) 2021-10-01 15:56:10 +01:00
Clément Pasteau
3ce71813ba Bump newIDE version (#3122) 2021-10-01 14:03:39 +01:00
Clément Pasteau
90300f895c Validate the username format in the create & edit forms 2021-10-01 14:56:14 +02:00
Florian Rival
9c8aa57fb6 Fix alignment of a background text in profile dialog
Don't show in changelog
2021-10-01 13:50:03 +01:00
Clément Pasteau
84876a1dff Display contributions (examples & extensions) on the user profile (#3110)
Display contributions (examples & extensions) on the user profile
2021-10-01 13:27:03 +02:00
Florian Rival
19ef8742f0 Extract translation sources and upload them to Crowdin at each commit on master (#3114)
* Extract but without upload for other branches

Don't show in changelog
2021-10-01 11:25:36 +01:00
Clément Pasteau
567efafa70 Display error if username is not valid 2021-10-01 11:41:59 +02:00
AlexandreS
c70685ccc7 Improve changelog extraction
Don't show in changelog
2021-09-30 17:10:15 +02:00
267 changed files with 6339 additions and 22599 deletions

15
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
# Automatically close issues with certain tags indicating that we need more information,
# after some days have passed.
daysUntilStale: 20
daysUntilClose: 7
# Only do this on tags implying we need more information:
onlyLabels: ["Need a game/precise steps to reproduce the issue","👋 Needs confirmation/testing"]
only: issues
markComment: >
This issue seems to be stale: it needs additional information but it has not had
recent activity. It will be closed in 7 days if no further activity occurs. Thank you
for your contributions.

View File

@@ -0,0 +1,47 @@
# GitHub Action to extract translations and (later) upload them to Crowdin.
name: Extract translations
on:
# Execute for all commits (to ensure translations extraction works)
push:
# Allows to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
extract-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Cache npm dependencies to speed up the workflow
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-newIDE-app-node_modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('newIDE/app/package-lock.json') }}
- name: Install gettext
run: sudo apt update && sudo apt install gettext -y
- name: Install newIDE dependencies
run: npm install
working-directory: newIDE/app
- name: Extract translations
run: npm run extract-all-translations
working-directory: newIDE/app
# Only upload on Crowdin for the master branch
- name: Install Crowdin CLI
if: github.ref == 'refs/heads/master'
run: npm i -g @crowdin/cli
- name: Upload translations to Crowdin
run: crowdin upload sources
if: github.ref == 'refs/heads/master'
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -0,0 +1,73 @@
# GitHub Action to update translations by downloading them from Crowdin,
# and open a Pull Request with the changes.
name: Update translations
on:
# Execute only on master
push:
branches:
- master
# Allows to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
update-translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Cache npm dependencies to speed up the workflow
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-newIDE-app-node_modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('newIDE/app/package-lock.json') }}
- name: Install gettext
run: sudo apt update && sudo apt install gettext -y
- name: Install newIDE dependencies
run: npm install
working-directory: newIDE/app
# We need to extract translations first to make sure all the source strings
# are included in the English catalogs. Otherwise, missing source strings
# with parameters (like "My name is {0}.") would be shown as-is when
# the app is built (but not in development - unclear why, LinguiJS issue?).
- name: Extract translations
run: npm run extract-all-translations
working-directory: newIDE/app
# (Build and) download the most recent translations (PO files) from Crowdin.
- name: Install Crowdin CLI
run: npm i -g @crowdin/cli
- name: Download new translations from Crowdin
run: crowdin download
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
# Seems like the three letters code is not handled properly by LinguiJS?
# Do without this language while we find a solution.
- name: Remove catalogs not handled properly by LinguiJS compile command.
run: rm -rf newIDE/app/src/locales/pcm_NG/
- name: Compile translations into .js files that are read by LinguiJS
run: npm run compile-translations
working-directory: newIDE/app
- name: Create a Pull Request with the changes
uses: peter-evans/create-pull-request@v3.10.1
with:
commit-message: Update translations [skip ci]
branch: chore/update-translations
delete-branch: true
title: '[Auto PR] Update translations'
body: |
This updates the translations by downloading them from Crowdin and compiling them for usage by the app.
Please double check the values in `newIDE/app/src/locales/LocalesMetadata.js` to ensure the changes are sensible.

2
.vscode/tasks.json vendored
View File

@@ -80,7 +80,7 @@
},
{
"type": "typescript",
"tsconfig": "GDJS/tsconfig.json",
"tsconfig": "tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"group": "test",

View File

@@ -67,13 +67,13 @@ class GD_CORE_API ExpressionParser2 {
}
/**
* Given an object name (or empty if none) and a behavior name (or empty if none),
* return the index of the first parameter that is inside the parenthesis:
* 0, 1 or 2.
*
* For example, in an expression like `Object.MyBehavior::Method("hello")`, the
* parameter "hello" is the second parameter (the first being by convention Object,
* and the second MyBehavior, also by convention).
* Given an object name (or empty if none) and a behavior name (or empty if
* none), return the index of the first parameter that is inside the
* parenthesis: 0, 1 or 2.
*
* For example, in an expression like `Object.MyBehavior::Method("hello")`,
* the parameter "hello" is the second parameter (the first being by
* convention Object, and the second MyBehavior, also by convention).
*/
static size_t WrittenParametersFirstIndex(const gd::String &objectName,
const gd::String &behaviorName) {
@@ -403,9 +403,18 @@ class GD_CORE_API ExpressionParser2 {
const gd::ExpressionMetadata &metadata =
MetadataProvider::GetAnyExpressionMetadata(platform, functionFullName);
// In case we can't find a valid expression, ensure the node has the type
// that is requested by the parent, so we avoid putting "unknown" (which
// would be also correct, but less precise and would prevent completions to
// be shown to the user)
const gd::String returnType =
gd::MetadataProvider::IsBadExpressionMetadata(metadata) == true
? type
: metadata.GetReturnType();
auto parametersNode = Parameters(metadata.parameters);
auto function =
gd::make_unique<FunctionCallNode>(metadata.GetReturnType(),
gd::make_unique<FunctionCallNode>(returnType,
std::move(parametersNode.parameters),
metadata,
functionFullName);
@@ -458,9 +467,18 @@ class GD_CORE_API ExpressionParser2 {
MetadataProvider::GetObjectAnyExpressionMetadata(
platform, objectType, objectFunctionOrBehaviorName);
// In case we can't find a valid expression, ensure the node has the type
// that is requested by the parent, so we avoid putting "unknown" (which
// would be also correct, but less precise and would prevent completions
// to be shown to the user)
const gd::String returnType =
gd::MetadataProvider::IsBadExpressionMetadata(metadata) == true
? type
: metadata.GetReturnType();
auto parametersNode = Parameters(metadata.parameters, objectName);
auto function = gd::make_unique<FunctionCallNode>(
metadata.GetReturnType(),
returnType,
objectName,
std::move(parametersNode.parameters),
metadata,
@@ -520,10 +538,19 @@ class GD_CORE_API ExpressionParser2 {
MetadataProvider::GetBehaviorAnyExpressionMetadata(
platform, behaviorType, functionName);
// In case we can't find a valid expression, ensure the node has the type
// that is requested by the parent, so we avoid putting "unknown" (which
// would be also correct, but less precise and would prevent completions
// to be shown to the user)
const gd::String returnType =
gd::MetadataProvider::IsBadExpressionMetadata(metadata) == true
? type
: metadata.GetReturnType();
auto parametersNode =
Parameters(metadata.parameters, objectName, behaviorName);
auto function = gd::make_unique<FunctionCallNode>(
metadata.GetReturnType(),
returnType,
objectName,
behaviorName,
std::move(parametersNode.parameters),

View File

@@ -83,9 +83,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
"res/actions/position.png")
.AddParameter("object", _("Object"))
.AddParameter("operator", _("Modification's sign"))
.AddParameter("operator", _("Modification's sign"), "number")
.AddParameter("expression", _("X position"))
.AddParameter("operator", _("Modification's sign"))
.AddParameter("operator", _("Modification's sign"), "number")
.AddParameter("expression", _("Y position"))
.MarkAsSimple();
@@ -98,9 +98,9 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
"res/actions/position24.png",
"res/actions/position.png")
.AddParameter("object", _("Object"))
.AddParameter("operator", _("Modification's sign"))
.AddParameter("operator", _("Modification's sign"), "number")
.AddParameter("expression", _("X position"))
.AddParameter("operator", _("Modification's sign"))
.AddParameter("operator", _("Modification's sign"), "number")
.AddParameter("expression", _("Y position"))
.MarkAsSimple();

View File

@@ -26,7 +26,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsKeyboardExtension(
extension
.AddCondition("KeyPressed",
_("Key pressed"),
_("Test if a key is pressed"),
_("Check if a key is pressed"),
_("_PARAM1_ key is pressed"),
_("Keyboard"),
"res/conditions/keyboard24.png",
@@ -37,7 +37,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsKeyboardExtension(
extension
.AddCondition("KeyReleased",
_("Key released"),
_("Test if a key was just released"),
_("Check if a key was just released"),
_("_PARAM1_ key is released"),
_("Keyboard"),
"res/conditions/keyboard24.png",
@@ -48,33 +48,33 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsKeyboardExtension(
extension
.AddCondition("KeyFromTextPressed",
_("Key pressed (text expression)"),
_("Test if a key, retrieved from the result of the "
_("Check if a key, retrieved from the result of the "
"expression, is pressed"),
_("_PARAM1_ key is pressed"),
_("Keyboard"),
"res/conditions/keyboard24.png",
"res/conditions/keyboard.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("string", _("Expression generating the key to test"))
.AddParameter("string", _("Expression generating the key to check"))
.MarkAsAdvanced();
extension
.AddCondition("KeyFromTextReleased",
_("Key released (text expression)"),
_("Test if a key, retrieved from the result of the "
_("Check if a key, retrieved from the result of the "
"expression, was just released"),
_("_PARAM1_ key is released"),
_("Keyboard"),
"res/conditions/keyboard24.png",
"res/conditions/keyboard.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("string", _("Expression generating the key to test"))
.AddParameter("string", _("Expression generating the key to check"))
.MarkAsAdvanced();
extension
.AddCondition("AnyKeyPressed",
_("Any key pressed"),
_("Test if any key is pressed"),
_("Check if any key is pressed"),
_("Any key is pressed"),
_("Keyboard"),
"res/conditions/keyboard24.png",
@@ -84,7 +84,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsKeyboardExtension(
extension
.AddCondition("AnyKeyReleased",
_("Any key released"),
_("Test if any key is released"),
_("Check if any key is released"),
_("Any key is released"),
_("Keyboard"),
"res/conditions/keyboard24.png",

View File

@@ -216,6 +216,39 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(
.AddParameter("mouse", _("Button to check"))
.MarkAsSimple();
extension
.AddCondition(
"MouseButtonFromTextPressed",
_("Mouse button pressed or touch held (text expression)"),
_("Check if a mouse button, retrieved from the result of the "
"expression, is pressed."),
_("_PARAM1_ mouse button is pressed"),
_("Mouse and touch"),
"res/conditions/mouse24.png",
"res/conditions/mouse.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("string", _("Expression generating the button to check"))
.SetParameterLongDescription(
_("Possible values are Left, Right and Middle."))
.MarkAsAdvanced();
extension
.AddCondition(
"MouseButtonFromTextReleased",
_("Mouse button released (text expression)"),
_("Check if a mouse button, retrieved from the result of the "
"expression, was just released."),
_("_PARAM1_ mouse button is released"),
_("Mouse and touch"),
"res/conditions/mouse24.png",
"res/conditions/mouse.png")
.AddCodeOnlyParameter("currentScene", "")
.AddParameter("string",
_("Expression generating the mouse button to check"))
.SetParameterLongDescription(
_("Possible values are Left, Right and Middle."))
.MarkAsAdvanced();
extension
.AddExpressionAndCondition("number",
"TouchX",
@@ -301,7 +334,6 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsMouseExtension(
_("Mouse and touch/Multitouch"),
"res/conditions/touch.png")
.AddCodeOnlyParameter("currentScene", "");
}
} // namespace gd

View File

@@ -195,7 +195,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(
"res/conditions/egal.png")
.SetHelpPath("/all-features/advanced-conditions")
.AddParameter("expression", _("First expression"))
.AddParameter("relationalOperator", _("Sign of the test"))
.AddParameter("relationalOperator", _("Sign of the test"), "number")
.AddParameter("expression", _("Second expression"))
.MarkAsAdvanced();
@@ -209,7 +209,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension(
"res/conditions/egal.png")
.SetHelpPath("/all-features/advanced-conditions")
.AddParameter("string", _("First string expression"))
.AddParameter("relationalOperator", _("Sign of the test"))
.AddParameter("relationalOperator", _("Sign of the test"), "string")
.AddParameter("string", _("Second string expression"))
.MarkAsAdvanced();
}

View File

@@ -34,7 +34,7 @@ ExpressionMetadata& ExpressionMetadata::SetHidden() {
gd::ExpressionMetadata& ExpressionMetadata::AddParameter(
const gd::String& type,
const gd::String& description,
const gd::String& optionalObjectType,
const gd::String& supplementaryInformation,
bool parameterIsOptional) {
gd::ParameterMetadata info;
info.type = type;
@@ -46,15 +46,15 @@ gd::ExpressionMetadata& ExpressionMetadata::AddParameter(
// parameter is an object/behavior type...
(gd::ParameterMetadata::IsObject(type) ||
gd::ParameterMetadata::IsBehavior(type))
? (optionalObjectType.empty()
? (supplementaryInformation.empty()
? ""
: extensionNamespace +
optionalObjectType //... so prefix it with the extension
supplementaryInformation //... so prefix it with the extension
// namespace.
)
: optionalObjectType; // Otherwise don't change anything
: supplementaryInformation; // Otherwise don't change anything
// TODO: Assert against optionalObjectType === "emsc" (when running with
// TODO: Assert against supplementaryInformation === "emsc" (when running with
// Emscripten), and warn about a missing argument when calling addParameter.
parameters.push_back(info);

View File

@@ -190,7 +190,7 @@ class GD_CORE_API ExpressionMetadata {
gd::ExpressionMetadata& AddParameter(
const gd::String& type,
const gd::String& description,
const gd::String& optionalObjectType = "",
const gd::String& supplementaryInformation = "",
bool parameterIsOptional = false);
/**

View File

@@ -51,7 +51,7 @@ InstructionMetadata::InstructionMetadata(const gd::String& extensionNamespace_,
InstructionMetadata& InstructionMetadata::AddParameter(
const gd::String& type,
const gd::String& description,
const gd::String& optionalObjectType,
const gd::String& supplementaryInformation,
bool parameterIsOptional) {
ParameterMetadata info;
info.type = type;
@@ -63,15 +63,15 @@ InstructionMetadata& InstructionMetadata::AddParameter(
// parameter is an object/behavior type...
(gd::ParameterMetadata::IsObject(type) ||
gd::ParameterMetadata::IsBehavior(type))
? (optionalObjectType.empty()
? (supplementaryInformation.empty()
? ""
: extensionNamespace +
optionalObjectType //... so prefix it with the extension
supplementaryInformation //... so prefix it with the extension
// namespace.
)
: optionalObjectType; // Otherwise don't change anything
: supplementaryInformation; // Otherwise don't change anything
// TODO: Assert against optionalObjectType === "emsc" (when running with
// TODO: Assert against supplementaryInformation === "emsc" (when running with
// Emscripten), and warn about a missing argument when calling addParameter.
parameters.push_back(info);
@@ -93,7 +93,7 @@ InstructionMetadata& InstructionMetadata::UseStandardOperatorParameters(
const gd::String& type) {
SetManipulatedType(type);
AddParameter("operator", _("Modification's sign"));
AddParameter("operator", _("Modification's sign"), type);
AddParameter(type == "number" ? "expression" : type, _("Value"));
size_t operatorParamIndex = parameters.size() - 2;
size_t valueParamIndex = parameters.size() - 1;
@@ -129,7 +129,7 @@ InstructionMetadata::UseStandardRelationalOperatorParameters(
const gd::String& type) {
SetManipulatedType(type);
AddParameter("relationalOperator", _("Sign of the test"));
AddParameter("relationalOperator", _("Sign of the test"), type);
AddParameter(type == "number" ? "expression" : type, _("Value to compare"));
size_t operatorParamIndex = parameters.size() - 2;
size_t valueParamIndex = parameters.size() - 1;

View File

@@ -6,7 +6,6 @@
#ifndef INSTRUCTIONMETADATA_H
#define INSTRUCTIONMETADATA_H
#if defined(GD_IDE_ONLY)
#include <functional>
#include <map>
#include <memory>
@@ -137,8 +136,11 @@ class GD_CORE_API InstructionMetadata {
* will also determine the type of the argument used when calling the function
* in the generated code.
* \param description Description for parameter
* \param optionalObjectType If type is "object", this parameter will describe
* which objects are allowed. If it is empty, all objects are allowed.
* \param supplementaryInformation Additional information that can be used for
* rendering or logic. For example:
* - If type is "object", this argument will describe which objects are allowed.
* If this argument is empty, all objects are allowed.
* - If type is "operator", this argument will be used to display only pertinent operators.
* \param parameterIsOptional true if the parameter must be optional, false
* otherwise.
*
@@ -146,7 +148,7 @@ class GD_CORE_API InstructionMetadata {
*/
InstructionMetadata &AddParameter(const gd::String &type,
const gd::String &label,
const gd::String &optionalObjectType = "",
const gd::String &supplementaryInformation = "",
bool parameterIsOptional = false);
/**
@@ -319,7 +321,7 @@ class GD_CORE_API InstructionMetadata {
* "CppPlatform/Extensions/text.png");
*
* .AddParameter("object", _("Object"), "Text", false)
* .AddParameter("operator", _("Modification operator"))
* .AddParameter("operator", _("Modification operator"), "string")
* .AddParameter("string", _("String"))
* .SetFunctionName("SetString").SetManipulatedType("string").SetGetter("GetString").SetIncludeFile("MyExtension/TextObject.h");
*
@@ -452,5 +454,4 @@ class GD_CORE_API InstructionMetadata {
} // namespace gd
#endif
#endif // INSTRUCTIONMETADATA_H

View File

@@ -38,19 +38,17 @@ class GD_CORE_API MultipleInstructionMetadata {
MultipleInstructionMetadata &AddParameter(
const gd::String &type,
const gd::String &label,
const gd::String &optionalObjectType = "",
const gd::String &supplementaryInformation = "",
bool parameterIsOptional = false) {
#if defined(GD_IDE_ONLY)
if (expression)
expression->AddParameter(
type, label, optionalObjectType, parameterIsOptional);
type, label, supplementaryInformation, parameterIsOptional);
if (condition)
condition->AddParameter(
type, label, optionalObjectType, parameterIsOptional);
type, label, supplementaryInformation, parameterIsOptional);
if (action)
action->AddParameter(
type, label, optionalObjectType, parameterIsOptional);
#endif
type, label, supplementaryInformation, parameterIsOptional);
return *this;
}
@@ -59,13 +57,11 @@ class GD_CORE_API MultipleInstructionMetadata {
*/
MultipleInstructionMetadata &AddCodeOnlyParameter(
const gd::String &type, const gd::String &supplementaryInformation) {
#if defined(GD_IDE_ONLY)
if (expression)
expression->AddCodeOnlyParameter(type, supplementaryInformation);
if (condition)
condition->AddCodeOnlyParameter(type, supplementaryInformation);
if (action) action->AddCodeOnlyParameter(type, supplementaryInformation);
#endif
return *this;
}
@@ -73,11 +69,9 @@ class GD_CORE_API MultipleInstructionMetadata {
* \see gd::InstructionMetadata::SetDefaultValue
*/
MultipleInstructionMetadata &SetDefaultValue(const gd::String &defaultValue) {
#if defined(GD_IDE_ONLY)
if (expression) expression->SetDefaultValue(defaultValue);
if (condition) condition->SetDefaultValue(defaultValue);
if (action) action->SetDefaultValue(defaultValue);
#endif
return *this;
};
@@ -86,11 +80,9 @@ class GD_CORE_API MultipleInstructionMetadata {
*/
MultipleInstructionMetadata &SetParameterLongDescription(
const gd::String &longDescription) {
#if defined(GD_IDE_ONLY)
if (expression) expression->SetParameterLongDescription(longDescription);
if (condition) condition->SetParameterLongDescription(longDescription);
if (action) action->SetParameterLongDescription(longDescription);
#endif
return *this;
};
@@ -98,11 +90,9 @@ class GD_CORE_API MultipleInstructionMetadata {
* \see gd::InstructionMetadata::SetHidden
*/
MultipleInstructionMetadata &SetHidden() {
#if defined(GD_IDE_ONLY)
if (expression) expression->SetHidden();
if (condition) condition->SetHidden();
if (action) action->SetHidden();
#endif
return *this;
};
@@ -111,50 +101,40 @@ class GD_CORE_API MultipleInstructionMetadata {
* \see gd::InstructionMetadata::UseStandardRelationalOperatorParameters
*/
MultipleInstructionMetadata &UseStandardParameters(const gd::String &type) {
#if defined(GD_IDE_ONLY)
if (condition) condition->UseStandardRelationalOperatorParameters(type);
if (action) action->UseStandardOperatorParameters(type);
#endif
return *this;
}
MultipleInstructionMetadata &SetFunctionName(const gd::String &functionName) {
#if defined(GD_IDE_ONLY)
if (expression) expression->SetFunctionName(functionName);
if (condition) condition->SetFunctionName(functionName);
if (action) action->GetCodeExtraInformation().SetFunctionName(functionName);
#endif
return *this;
}
MultipleInstructionMetadata &SetGetter(const gd::String &getter) {
#if defined(GD_IDE_ONLY)
if (expression) expression->SetFunctionName(getter);
if (condition) condition->SetFunctionName(getter);
if (action) action->GetCodeExtraInformation().SetGetter(getter);
#endif
return *this;
}
MultipleInstructionMetadata &SetIncludeFile(const gd::String &includeFile) {
#if defined(GD_IDE_ONLY)
if (expression)
expression->GetCodeExtraInformation().SetIncludeFile(includeFile);
if (condition)
condition->GetCodeExtraInformation().SetIncludeFile(includeFile);
if (action) action->GetCodeExtraInformation().SetIncludeFile(includeFile);
#endif
return *this;
}
MultipleInstructionMetadata &AddIncludeFile(const gd::String &includeFile) {
#if defined(GD_IDE_ONLY)
if (expression)
expression->GetCodeExtraInformation().AddIncludeFile(includeFile);
if (condition)
condition->GetCodeExtraInformation().AddIncludeFile(includeFile);
if (action) action->GetCodeExtraInformation().AddIncludeFile(includeFile);
#endif
return *this;
}
@@ -162,10 +142,8 @@ class GD_CORE_API MultipleInstructionMetadata {
* \see gd::InstructionMetadata::MarkAsSimple
*/
MultipleInstructionMetadata &MarkAsSimple() {
#if defined(GD_IDE_ONLY)
if (condition) condition->MarkAsSimple();
if (action) action->MarkAsSimple();
#endif
return *this;
}
@@ -173,10 +151,8 @@ class GD_CORE_API MultipleInstructionMetadata {
* \see gd::InstructionMetadata::MarkAsAdvanced
*/
MultipleInstructionMetadata &MarkAsAdvanced() {
#if defined(GD_IDE_ONLY)
if (condition) condition->MarkAsAdvanced();
if (action) action->MarkAsAdvanced();
#endif
return *this;
}
@@ -184,10 +160,8 @@ class GD_CORE_API MultipleInstructionMetadata {
* \see gd::InstructionMetadata::MarkAsComplex
*/
MultipleInstructionMetadata &MarkAsComplex() {
#if defined(GD_IDE_ONLY)
if (condition) condition->MarkAsComplex();
if (action) action->MarkAsComplex();
#endif
return *this;
}

View File

@@ -302,6 +302,38 @@ ObjectMetadata::AddExpressionAndConditionAndAction(
expression, condition, action);
}
gd::InstructionMetadata& ObjectMetadata::AddDuplicatedAction(
const gd::String& newActionName, const gd::String& copiedActionName) {
gd::String newNameWithNamespace = extensionNamespace + newActionName;
gd::String copiedNameWithNamespace = extensionNamespace + copiedActionName;
auto copiedAction = actionsInfos.find(copiedNameWithNamespace);
if (copiedAction == actionsInfos.end()) {
gd::LogWarning("Could not find an action with name " +
copiedNameWithNamespace + " to copy.");
} else {
actionsInfos[newNameWithNamespace] = copiedAction->second;
}
return actionsInfos[newNameWithNamespace];
}
gd::InstructionMetadata& ObjectMetadata::AddDuplicatedCondition(
const gd::String& newConditionName, const gd::String& copiedConditionName) {
gd::String newNameWithNamespace = extensionNamespace + newConditionName;
gd::String copiedNameWithNamespace = extensionNamespace + copiedConditionName;
auto copiedCondition = conditionsInfos.find(copiedNameWithNamespace);
if (copiedCondition == conditionsInfos.end()) {
gd::LogWarning("Could not find a condition with name " +
copiedNameWithNamespace + " to copy.");
} else {
conditionsInfos[newNameWithNamespace] = copiedCondition->second;
}
return conditionsInfos[newNameWithNamespace];
}
ObjectMetadata& ObjectMetadata::SetFullName(const gd::String& fullname_) {
#if defined(GD_IDE_ONLY)
fullname = fullname_;

View File

@@ -153,6 +153,25 @@ class GD_CORE_API ObjectMetadata {
const gd::String& group,
const gd::String& icon);
/**
* \brief Create a new action which is the duplicate of the specified one.
*
* Useful for handling a deprecated action that is just a "copy" of the new
* one.
*/
gd::InstructionMetadata& AddDuplicatedAction(
const gd::String& newActionName, const gd::String& copiedActionName);
/**
* \brief Create a new condition which is the duplicate of the specified one.
*
* Useful for handling a deprecated condition that is just a "copy" of the new
* one.
*/
gd::InstructionMetadata& AddDuplicatedCondition(
const gd::String& newConditionName,
const gd::String& copiedConditionName);
/**
* \brief Set the name shown to the user.
*/

View File

@@ -19,11 +19,14 @@
#include "GDCore/Extensions/Platform.h"
#include "GDCore/IDE/Events/ExpressionValidator.h"
#include "GDCore/Project/ObjectsContainer.h"
#include "GDCore/IDE/Events/InstructionSentenceFormatter.h"
using namespace std;
namespace gd {
const gd::String EventsRefactorer::searchIgnoredCharacters = ";:,#()";
/**
* \brief Go through the nodes and change the given object name to a new one.
*
@@ -675,16 +678,27 @@ bool EventsRefactorer::ReplaceStringInConditions(
}
vector<EventsSearchResult> EventsRefactorer::SearchInEvents(
gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
const gd::Platform& platform,
gd::EventsList& events,
gd::String search,
bool matchCase,
bool inConditions,
bool inActions,
bool inEventStrings) {
bool inEventStrings,
bool inEventSentences) {
vector<EventsSearchResult> results;
const gd::String& ignored_characters = EventsRefactorer::searchIgnoredCharacters;
search.replace_if(search.begin(),
search.end(),
[ignored_characters](const char &c) {
return ignored_characters.find(c) != gd::String::npos;
},
"");
search = search.LeftTrim().RightTrim();
search.RemoveConsecutiveOccurrences(search.begin(), search.end(), ' ');
for (std::size_t i = 0; i < events.size(); ++i) {
bool eventAddedInResults = false;
@@ -694,7 +708,7 @@ vector<EventsSearchResult> EventsRefactorer::SearchInEvents(
for (std::size_t j = 0; j < conditionsVectors.size(); ++j) {
if (!eventAddedInResults &&
SearchStringInConditions(
project, layout, *conditionsVectors[j], search, matchCase)) {
platform, *conditionsVectors[j], search, matchCase, inEventSentences)) {
results.push_back(EventsSearchResult(
std::weak_ptr<gd::BaseEvent>(events.GetEventSmartPtr(i)),
&events,
@@ -709,7 +723,7 @@ vector<EventsSearchResult> EventsRefactorer::SearchInEvents(
for (std::size_t j = 0; j < actionsVectors.size(); ++j) {
if (!eventAddedInResults &&
SearchStringInActions(
project, layout, *actionsVectors[j], search, matchCase)) {
platform, *actionsVectors[j], search, matchCase, inEventSentences)) {
results.push_back(EventsSearchResult(
std::weak_ptr<gd::BaseEvent>(events.GetEventSmartPtr(i)),
&events,
@@ -720,7 +734,7 @@ vector<EventsSearchResult> EventsRefactorer::SearchInEvents(
if (inEventStrings) {
if (!eventAddedInResults &&
SearchStringInEvent(project, layout, events[i], search, matchCase)) {
SearchStringInEvent(events[i], search, matchCase)) {
results.push_back(EventsSearchResult(
std::weak_ptr<gd::BaseEvent>(events.GetEventSmartPtr(i)),
&events,
@@ -730,14 +744,14 @@ vector<EventsSearchResult> EventsRefactorer::SearchInEvents(
if (events[i].CanHaveSubEvents()) {
vector<EventsSearchResult> subResults =
SearchInEvents(project,
layout,
SearchInEvents(platform,
events[i].GetSubEvents(),
search,
matchCase,
inConditions,
inActions,
inEventStrings);
inEventStrings,
inEventSentences);
std::copy(
subResults.begin(), subResults.end(), std::back_inserter(results));
}
@@ -746,11 +760,12 @@ vector<EventsSearchResult> EventsRefactorer::SearchInEvents(
return results;
}
bool EventsRefactorer::SearchStringInActions(gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
gd::InstructionsList& actions,
gd::String search,
bool matchCase) {
bool EventsRefactorer::SearchStringInActions(
const gd::Platform& platform,
gd::InstructionsList& actions,
gd::String search,
bool matchCase,
bool inSentences) {
for (std::size_t aId = 0; aId < actions.size(); ++aId) {
for (std::size_t pNb = 0; pNb < actions[aId].GetParameters().size();
++pNb) {
@@ -765,24 +780,60 @@ bool EventsRefactorer::SearchStringInActions(gd::ObjectsContainer& project,
if (foundPosition != gd::String::npos) return true;
}
if (inSentences && SearchStringInFormattedText(
platform, actions[aId], search, matchCase, false))
return true;
if (!actions[aId].GetSubInstructions().empty() &&
SearchStringInActions(project,
layout,
SearchStringInActions(platform,
actions[aId].GetSubInstructions(),
search,
matchCase))
matchCase,
inSentences))
return true;
}
return false;
}
bool EventsRefactorer::SearchStringInFormattedText(
const gd::Platform& platform,
gd::Instruction& instruction,
gd::String search,
bool matchCase,
bool isCondition) {
const auto& metadata = isCondition
? gd::MetadataProvider::GetConditionMetadata(
platform, instruction.GetType())
: gd::MetadataProvider::GetActionMetadata(
platform, instruction.GetType());
gd::String completeSentence = gd::InstructionSentenceFormatter::Get()->GetFullText(instruction, metadata);
const gd::String& ignored_characters = EventsRefactorer::searchIgnoredCharacters;
completeSentence.replace_if(completeSentence.begin(),
completeSentence.end(),
[ignored_characters](const char &c) {
return ignored_characters.find(c) != gd::String::npos;
},
"");
completeSentence.RemoveConsecutiveOccurrences(
completeSentence.begin(), completeSentence.end(), ' ');
size_t foundPosition = matchCase
? completeSentence.find(search)
: completeSentence.FindCaseInsensitive(search);
return foundPosition != gd::String::npos;
}
bool EventsRefactorer::SearchStringInConditions(
gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
const gd::Platform& platform,
gd::InstructionsList& conditions,
gd::String search,
bool matchCase) {
bool matchCase,
bool inSentences) {
for (std::size_t cId = 0; cId < conditions.size(); ++cId) {
for (std::size_t pNb = 0; pNb < conditions[cId].GetParameters().size();
++pNb) {
@@ -797,21 +848,23 @@ bool EventsRefactorer::SearchStringInConditions(
if (foundPosition != gd::String::npos) return true;
}
if (inSentences && SearchStringInFormattedText(
platform, conditions[cId], search, matchCase, true))
return true;
if (!conditions[cId].GetSubInstructions().empty() &&
SearchStringInConditions(project,
layout,
SearchStringInConditions(platform,
conditions[cId].GetSubInstructions(),
search,
matchCase))
matchCase,
inSentences))
return true;
}
return false;
}
bool EventsRefactorer::SearchStringInEvent(gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
gd::BaseEvent& event,
bool EventsRefactorer::SearchStringInEvent(gd::BaseEvent& event,
gd::String search,
bool matchCase) {
for (gd::String str : event.GetAllSearchableStrings()) {

View File

@@ -41,7 +41,7 @@ class GD_CORE_API EventsSearchResult {
std::size_t positionInList;
bool IsEventsListValid() const { return eventsList != nullptr; }
/**
* \brief Get the events list containing the event pointed by the EventsSearchResult.
* \warning Only call this when IsEventsListValid returns true.
@@ -49,7 +49,7 @@ class GD_CORE_API EventsSearchResult {
const gd::EventsList & GetEventsList() const { return *eventsList; }
std::size_t GetPositionInList() const { return positionInList; }
bool IsEventValid() const { return !event.expired(); }
/**
@@ -72,7 +72,7 @@ class GD_CORE_API EventsSearchResult {
class GD_CORE_API EventsRefactorer {
public:
/**
* Replace all occurences of an object name by another name
* Replace all occurrences of an object name by another name
* ( include : objects in parameters and in math/text expressions of all
* events ).
*/
@@ -98,14 +98,14 @@ class GD_CORE_API EventsRefactorer {
* \return A vector containing EventsSearchResult objects filled with events
* containing the string
*/
static std::vector<EventsSearchResult> SearchInEvents(gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
static std::vector<EventsSearchResult> SearchInEvents(const gd::Platform& platform,
gd::EventsList& events,
gd::String search,
bool matchCase,
bool inConditions,
bool inActions,
bool inEventStrings);
bool inEventStrings,
bool inEventSentences);
/**
* Replace all occurrences of a gd::String in events
@@ -123,7 +123,7 @@ class GD_CORE_API EventsRefactorer {
private:
/**
* Replace all occurences of an object name by another name in an action
* Replace all occurrences of an object name by another name in an action
* ( include : objects in parameters and in math/text expressions ).
*
* \return true if something was modified.
@@ -136,7 +136,7 @@ class GD_CORE_API EventsRefactorer {
gd::String newName);
/**
* Replace all occurences of an object name by another name in a condition
* Replace all occurrences of an object name by another name in a condition
* ( include : objects in parameters and in math/text expressions ).
*
* \return true if something was modified.
@@ -185,7 +185,7 @@ class GD_CORE_API EventsRefactorer {
gd::String name);
/**
* Replace all occurences of a gd::String in conditions
* Replace all occurrences of a gd::String in conditions
*
* \return true if something was modified.
*/
@@ -197,7 +197,7 @@ class GD_CORE_API EventsRefactorer {
bool matchCase);
/**
* Replace all occurences of a gd::String in actions
* Replace all occurrences of a gd::String in actions
*
* \return true if something was modified.
*/
@@ -208,21 +208,26 @@ class GD_CORE_API EventsRefactorer {
gd::String newString,
bool matchCase);
static bool SearchStringInActions(gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
static bool SearchStringInFormattedText(const gd::Platform& platform,
gd::Instruction& instruction,
gd::String search,
bool matchCase,
bool isCondition);
static bool SearchStringInActions(const gd::Platform& platform,
gd::InstructionsList& actions,
gd::String search,
bool matchCase);
static bool SearchStringInConditions(gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
bool matchCase,
bool inSentences);
static bool SearchStringInConditions(const gd::Platform& platform,
gd::InstructionsList& conditions,
gd::String search,
bool matchCase);
static bool SearchStringInEvent(gd::ObjectsContainer& project,
gd::ObjectsContainer& layout,
gd::BaseEvent& events,
gd::String search,
bool matchCase);
bool matchCase,
bool inSentences);
static bool SearchStringInEvent(gd::BaseEvent& events,
gd::String search,
bool matchCase);
static const gd::String searchIgnoredCharacters;
EventsRefactorer(){};
};

View File

@@ -9,12 +9,12 @@
#include <memory>
#include <vector>
#include "GDCore/Events/Parsers/ExpressionParser2.h"
#include "GDCore/Events/Parsers/ExpressionParser2Node.h"
#include "GDCore/Events/Parsers/ExpressionParser2NodeWorker.h"
#include "GDCore/Extensions/Metadata/ExpressionMetadata.h"
#include "GDCore/Extensions/Metadata/InstructionMetadata.h"
#include "GDCore/IDE/Events/ExpressionNodeLocationFinder.h"
#include "GDCore/Events/Parsers/ExpressionParser2.h"
namespace gd {
class Expression;
@@ -326,10 +326,7 @@ class GD_CORE_API ExpressionCompletionFinder
node.type, "", searchedPosition + 1, searchedPosition + 1));
}
void OnVisitOperatorNode(OperatorNode& node) override {
completions.push_back(ExpressionCompletionDescription::ForObject(
node.type, "", searchedPosition + 1, searchedPosition + 1));
completions.push_back(ExpressionCompletionDescription::ForExpression(
node.type, "", searchedPosition + 1, searchedPosition + 1));
// No completions.
}
void OnVisitUnaryOperatorNode(UnaryOperatorNode& node) override {
completions.push_back(ExpressionCompletionDescription::ForObject(
@@ -359,8 +356,9 @@ class GD_CORE_API ExpressionCompletionFinder
}
// Search the parameter metadata index skipping invisible ones.
size_t visibleParameterIndex = 0;
size_t metadataParameterIndex = ExpressionParser2::WrittenParametersFirstIndex(
functionCall->objectName, functionCall->behaviorName);
size_t metadataParameterIndex =
ExpressionParser2::WrittenParametersFirstIndex(
functionCall->objectName, functionCall->behaviorName);
const gd::ParameterMetadata* parameterMetadata = nullptr;
while (metadataParameterIndex <

View File

@@ -4,7 +4,6 @@
* reserved. This project is released under the MIT License.
*/
#if defined(GD_IDE_ONLY)
#include "GDCore/IDE/Events/InstructionSentenceFormatter.h"
#include <algorithm>
#include <iostream>
@@ -90,6 +89,19 @@ InstructionSentenceFormatter::GetAsFormattedText(
return formattedStr;
}
} // namespace gd
gd::String InstructionSentenceFormatter::GetFullText(
const gd::Instruction &instr, const gd::InstructionMetadata &metadata)
{
const std::vector<std::pair<gd::String, gd::TextFormatting> > formattedText =
GetAsFormattedText(instr, metadata);
#endif
gd::String completeSentence = "";
for (std::size_t id = 0; id < formattedText.size(); ++id) {
completeSentence += formattedText.at(id).first;
}
return completeSentence;
}
} // namespace gd

View File

@@ -4,7 +4,6 @@
* reserved. This project is released under the MIT License.
*/
#if defined(GD_IDE_ONLY)
#ifndef TRANSLATEACTION_H
#define TRANSLATEACTION_H
#include <map>
@@ -39,6 +38,9 @@ class GD_CORE_API InstructionSentenceFormatter {
return (static_cast<InstructionSentenceFormatter *>(_singleton));
}
gd::String GetFullText(const gd::Instruction &instr,
const gd::InstructionMetadata &metadata);
static void DestroySingleton() {
if (NULL != _singleton) {
delete _singleton;
@@ -55,4 +57,3 @@ class GD_CORE_API InstructionSentenceFormatter {
} // namespace gd
#endif // TRANSLATEACTION_H
#endif

View File

@@ -1,5 +1,5 @@
#if defined(GD_IDE_ONLY)
#include "GDCore/Project/ExternalEvents.h"
#include "ExternalEvents.h"
#include "GDCore/Events/Event.h"
#include "GDCore/Events/Serialization.h"
@@ -48,4 +48,3 @@ void ExternalEvents::UnserializeFrom(gd::Project& project,
}
} // namespace gd
#endif

View File

@@ -3,12 +3,12 @@
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
* reserved. This project is released under the MIT License.
*/
#if defined(GD_IDE_ONLY)
#ifndef GDCORE_EXTERNALEVENTS_H
#define GDCORE_EXTERNALEVENTS_H
#include <ctime>
#include <memory>
#include <vector>
#include "GDCore/Events/EventsList.h"
#include "GDCore/String.h"
namespace gd {
@@ -135,4 +135,3 @@ struct ExternalEventsHasName
} // namespace gd
#endif // GDCORE_EXTERNALEVENTS_H
#endif

View File

@@ -5,6 +5,7 @@
*/
#include "GDCore/Project/ExternalLayout.h"
#include "GDCore/IDE/Dialogs/LayoutEditorCanvas/EditorSettings.h"
#include "GDCore/Project/InitialInstancesContainer.h"
#include "GDCore/Serialization/SerializerElement.h"
@@ -15,19 +16,15 @@ namespace gd {
void ExternalLayout::UnserializeFrom(const SerializerElement& element) {
name = element.GetStringAttribute("name", "", "Name");
instances.UnserializeFrom(element.GetChild("instances", 0, "Instances"));
#if defined(GD_IDE_ONLY)
editorSettings.UnserializeFrom(element.GetChild("editionSettings"));
#endif
associatedLayout = element.GetStringAttribute("associatedLayout");
}
#if defined(GD_IDE_ONLY)
void ExternalLayout::SerializeTo(SerializerElement& element) const {
element.SetAttribute("name", name);
instances.SerializeTo(element.AddChild("instances"));
editorSettings.SerializeTo(element.AddChild("editionSettings"));
element.SetAttribute("associatedLayout", associatedLayout);
}
#endif
} // namespace gd

View File

@@ -7,14 +7,13 @@
#ifndef GDCORE_EXTERNALLAYOUT_H
#define GDCORE_EXTERNALLAYOUT_H
#include <memory>
#include "GDCore/Project/InitialInstancesContainer.h"
#include "GDCore/String.h"
namespace gd {
class SerializerElement;
}
#if defined(GD_IDE_ONLY)
#include "GDCore/IDE/Dialogs/LayoutEditorCanvas/EditorSettings.h"
#endif
namespace gd {
@@ -54,7 +53,6 @@ class GD_CORE_API ExternalLayout {
*/
gd::InitialInstancesContainer& GetInitialInstances() { return instances; }
#if defined(GD_IDE_ONLY)
/**
* \brief Get the user settings for the IDE.
*/
@@ -65,10 +63,7 @@ class GD_CORE_API ExternalLayout {
/**
* \brief Get the user settings for the IDE.
*/
gd::EditorSettings& GetAssociatedEditorSettings() {
return editorSettings;
}
#endif
gd::EditorSettings& GetAssociatedEditorSettings() { return editorSettings; }
/**
* \brief Get the name of the layout last used to edit the external layout.
@@ -80,15 +75,13 @@ class GD_CORE_API ExternalLayout {
*/
void SetAssociatedLayout(const gd::String& name) { associatedLayout = name; }
/** \name Serialization
*/
///@{
#if defined(GD_IDE_ONLY)
/** \name Serialization
*/
///@{
/**
* \brief Serialize external layout.
*/
void SerializeTo(SerializerElement& element) const;
#endif
/**
* \brief Unserialize the external layout.
@@ -99,9 +92,7 @@ class GD_CORE_API ExternalLayout {
private:
gd::String name;
gd::InitialInstancesContainer instances;
#if defined(GD_IDE_ONLY)
gd::EditorSettings editorSettings;
#endif
gd::String associatedLayout;
};

View File

@@ -6,6 +6,7 @@
#include "GDCore/String.h"
#include <algorithm>
#include <string.h>
#include <SFML/System/String.hpp>
@@ -283,6 +284,42 @@ String& String::insert( size_type pos, const String &str )
return *this;
}
String& String::replace_if(iterator i1, iterator i2, std::function<bool(char32_t)> p, const String &str)
{
String::size_type offset = 1;
iterator it = i1.base();
while(it < i2.base())
{
if (p(*it)) { replace(std::distance(begin(), it), offset, str); }
else { it++; }
}
return *this;
}
String& String::RemoveConsecutiveOccurrences(iterator i1, iterator i2, const char c)
{
std::vector<std::pair<size_type, size_type>> ranges_to_remove;
for(iterator current_index = i1.base(); current_index < i2.base(); current_index++)
{
if (*current_index == c){
iterator current_subindex = current_index;
std::advance(current_subindex, 1);
if (*current_subindex == c) {
while(current_subindex < end() && *current_subindex == c)
{
current_subindex++;
}
replace(std::distance(begin(), current_index),
std::distance(current_index, current_subindex),
c);
std::advance(current_index, 1);
}
}
}
return *this;
}
String& String::replace( iterator i1, iterator i2, const String &str )
{
m_string.replace(i1.base(), i2.base(), str.m_string);
@@ -290,6 +327,31 @@ String& String::replace( iterator i1, iterator i2, const String &str )
return *this;
}
String& String::replace( iterator i1, iterator i2, size_type n, const char c )
{
m_string.replace(i1.base(), i2.base(), n, c);
return *this;
}
String& String::replace( String::size_type pos, String::size_type len, const char c )
{
if(pos > size())
throw std::out_of_range("[gd::String::replace] starting pos greater than size");
iterator i1 = begin();
std::advance( i1, pos );
iterator i2 = i1;
while(i2 != end() && len > 0) //Increment "len" times and stop if end() is reached
{
++i2;
--len;
}
return replace( i1, i2, 1, c );
}
String& String::replace( String::size_type pos, String::size_type len, const String &str )
{
if(pos > size())

View File

@@ -438,15 +438,52 @@ public:
*/
String& replace( iterator i1, iterator i2, const String &str );
/**
* \brief Replace the portion of the String between **i1** and **i2** (**i2** not
* included) by **n** consecutive copies of character **c**.
* \return *this
*
* **Iterators :** All iterators may be invalidated.
*/
String& replace( iterator i1, iterator i2, size_type n, const char c );
/**
* \brief Replace the portion of the String between **pos** and **pos** + **len**
* (the character at **pos** + **len** is not included)
* (the character at **pos** + **len** is not included) with **str**.
* \return *this
*
* **Iterators :** All iterators may be invalidated.
*/
String& replace( size_type pos, size_type len, const String &str );
/**
* \brief Replace the portion of the String between **pos** and **pos** + **len**
* (the character at **pos** + **len** is not included) with the character **c**.
* \return *this
*
* **Iterators :** All iterators may be invalidated.
*/
String& replace( size_type pos, size_type len, const char c );
/**
* \brief Search in the portion of the String between **i1** and **i2** (**i2** not
* included) for characters matching predicate function **p** and replace them
* by the String **str**.
* \return *this
*
* **Iterators :** All iterators may be invalidated.
*/
String& replace_if( iterator i1, iterator i2, std::function<bool(char32_t)> p, const String &str );
/**
* \brief Remove consecutive occurrences of the character **c** in the portion of the
* between **i1** and **i2** (**i2** not included) to replace it by a single occurrence.
* \return *this
*
* **Iterators :** All iterators may be invalidated.
*/
String& RemoveConsecutiveOccurrences(iterator i1, iterator i2, const char c);
/**
* \brief Erase the characters between **first** and **last** (**last** not included).
* \param first an iterator to the first character to remove

View File

@@ -87,42 +87,27 @@ TEST_CASE("ExpressionCompletionFinder", "[common][events]") {
}
}
SECTION("Operator (number)") {
std::vector<gd::ExpressionCompletionDescription> expectedCompletions1{
gd::ExpressionCompletionDescription::ForObject("number", "", 1, 1),
gd::ExpressionCompletionDescription::ForExpression("number", "", 1, 1)};
std::vector<gd::ExpressionCompletionDescription> expectedCompletions2{
gd::ExpressionCompletionDescription::ForObject("number", "", 2, 2),
gd::ExpressionCompletionDescription::ForExpression("number", "", 2, 2)};
std::vector<gd::ExpressionCompletionDescription> expectedCompletions3{
gd::ExpressionCompletionDescription::ForObject("number", "", 3, 3),
gd::ExpressionCompletionDescription::ForExpression("number", "", 3, 3)};
REQUIRE(getCompletionsFor("number", "1 + ", 1) == expectedCompletions1);
REQUIRE(getCompletionsFor("number", "1 + ", 2) == expectedCompletions2);
REQUIRE(getCompletionsFor("number", "1 + ", 3) == expectedCompletions3);
REQUIRE(getCompletionsFor("number", "1 + ", 1) == expectedEmptyCompletions);
REQUIRE(getCompletionsFor("number", "1 + ", 2) == expectedEmptyCompletions);
REQUIRE(getCompletionsFor("number", "1 + ", 3) == expectedEmptyCompletions);
}
SECTION("Operator (string)") {
std::vector<gd::ExpressionCompletionDescription> expectedCompletions3{
gd::ExpressionCompletionDescription::ForObject("string", "", 3, 3),
gd::ExpressionCompletionDescription::ForExpression("string", "", 3, 3)};
std::vector<gd::ExpressionCompletionDescription> expectedCompletions4{
gd::ExpressionCompletionDescription::ForObject("string", "", 4, 4),
gd::ExpressionCompletionDescription::ForExpression("string", "", 4, 4)};
std::vector<gd::ExpressionCompletionDescription> expectedCompletions5{
gd::ExpressionCompletionDescription::ForObject("string", "", 5, 5),
gd::ExpressionCompletionDescription::ForExpression("string", "", 5, 5)};
REQUIRE(getCompletionsFor("string", "\"a\" + ", 3) == expectedCompletions3);
REQUIRE(getCompletionsFor("string", "\"a\" + ", 4) == expectedCompletions4);
REQUIRE(getCompletionsFor("string", "\"a\" + ", 5) == expectedCompletions5);
REQUIRE(getCompletionsFor("string", "\"a\" + ", 3) ==
expectedEmptyCompletions);
REQUIRE(getCompletionsFor("string", "\"a\" + ", 4) ==
expectedEmptyCompletions);
REQUIRE(getCompletionsFor("string", "\"a\" + ", 5) ==
expectedEmptyCompletions);
}
SECTION("Free function") {
SECTION("Test 1") {
std::vector<gd::ExpressionCompletionDescription> expectedCompletions{
gd::ExpressionCompletionDescription::ForExpression(
"unknown", "Function", 0, 8)};
"string", "Function", 0, 8)};
std::vector<gd::ExpressionCompletionDescription> expectedExactCompletions{
gd::ExpressionCompletionDescription::ForExpression(
"unknown", "Function", 0, 8)
"string", "Function", 0, 8)
.SetIsExact(true)};
REQUIRE(getCompletionsFor("string", "Function(", 0) ==
expectedCompletions);
@@ -230,17 +215,17 @@ TEST_CASE("ExpressionCompletionFinder", "[common][events]") {
std::vector<gd::ExpressionCompletionDescription>
expectedObjectCompletions{
gd::ExpressionCompletionDescription::ForObject(
"unknown", "MyObject", 0, 8)};
"string", "MyObject", 0, 8)};
std::vector<gd::ExpressionCompletionDescription>
expectedBehaviorOrFunctionCompletions{
gd::ExpressionCompletionDescription::ForBehavior(
"Func", 9, 13, "MyObject"),
gd::ExpressionCompletionDescription::ForExpression(
"unknown", "Func", 9, 13, "MyObject")};
"string", "Func", 9, 13, "MyObject")};
std::vector<gd::ExpressionCompletionDescription>
expectedExactFunctionCompletions{
gd::ExpressionCompletionDescription::ForExpression(
"unknown", "Func", 9, 13, "MyObject")
"string", "Func", 9, 13, "MyObject")
.SetIsExact(true)};
REQUIRE(getCompletionsFor("string", "MyObject.Func(", 0) ==
expectedObjectCompletions);
@@ -329,7 +314,7 @@ TEST_CASE("ExpressionCompletionFinder", "[common][events]") {
std::vector<gd::ExpressionCompletionDescription>
expectedObjectCompletions{
gd::ExpressionCompletionDescription::ForObject(
"unknown", "MyObject", 0, 8)};
"string", "MyObject", 0, 8)};
std::vector<gd::ExpressionCompletionDescription>
expectedBehaviorCompletions{
gd::ExpressionCompletionDescription::ForBehavior(
@@ -337,11 +322,11 @@ TEST_CASE("ExpressionCompletionFinder", "[common][events]") {
std::vector<gd::ExpressionCompletionDescription>
expectedFunctionCompletions{
gd::ExpressionCompletionDescription::ForExpression(
"unknown", "Func", 21, 25, "MyObject", "MyBehavior")};
"string", "Func", 21, 25, "MyObject", "MyBehavior")};
std::vector<gd::ExpressionCompletionDescription>
expectedExactFunctionCompletions{
gd::ExpressionCompletionDescription::ForExpression(
"unknown", "Func", 21, 25, "MyObject", "MyBehavior")
"string", "Func", 21, 25, "MyObject", "MyBehavior")
.SetIsExact(true)};
REQUIRE(getCompletionsFor("string", "MyObject.MyBehavior::Func(", 0) ==
expectedObjectCompletions);

View File

@@ -971,6 +971,35 @@ TEST_CASE("ExpressionParser2", "[common][events]") {
REQUIRE(objectFunctionName.objectFunctionOrBehaviorName == "");
}
SECTION("Unfinished object function name of type string with parentheses") {
auto node = parser.ParseExpression("string", "MyObject.()");
REQUIRE(node != nullptr);
auto &objectFunctionCall = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(objectFunctionCall.objectName == "MyObject");
REQUIRE(objectFunctionCall.functionName == "");
REQUIRE(objectFunctionCall.type == "string");
}
SECTION("Unfinished object function name of type number with parentheses") {
auto node = parser.ParseExpression("number", "MyObject.()");
REQUIRE(node != nullptr);
auto &objectFunctionCall = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(objectFunctionCall.objectName == "MyObject");
REQUIRE(objectFunctionCall.functionName == "");
REQUIRE(objectFunctionCall.type == "number");
}
SECTION(
"Unfinished object function name of type number|string with "
"parentheses") {
auto node = parser.ParseExpression("number|string", "MyObject.()");
REQUIRE(node != nullptr);
auto &objectFunctionCall = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(objectFunctionCall.objectName == "MyObject");
REQUIRE(objectFunctionCall.functionName == "");
REQUIRE(objectFunctionCall.type == "number|string");
}
SECTION("Unfinished object behavior name") {
auto node = parser.ParseExpression("string", "MyObject.MyBehavior::");
REQUIRE(node != nullptr);
@@ -981,6 +1010,67 @@ TEST_CASE("ExpressionParser2", "[common][events]") {
REQUIRE(objectFunctionName.behaviorFunctionName == "");
}
SECTION("Unfinished object behavior name of type string with parentheses") {
auto node = parser.ParseExpression("string", "MyObject.MyBehavior::()");
REQUIRE(node != nullptr);
auto &objectFunctionName = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(objectFunctionName.objectName == "MyObject");
REQUIRE(objectFunctionName.behaviorName == "MyBehavior");
REQUIRE(objectFunctionName.functionName == "");
REQUIRE(objectFunctionName.type == "string");
}
SECTION("Unfinished object behavior name of type number with parentheses") {
auto node = parser.ParseExpression("number", "MyObject.MyBehavior::()");
REQUIRE(node != nullptr);
auto &objectFunctionName = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(objectFunctionName.objectName == "MyObject");
REQUIRE(objectFunctionName.behaviorName == "MyBehavior");
REQUIRE(objectFunctionName.functionName == "");
REQUIRE(objectFunctionName.type == "number");
}
SECTION(
"Unfinished object behavior name of type number|string with "
"parentheses") {
auto node =
parser.ParseExpression("number|string", "MyObject.MyBehavior::()");
REQUIRE(node != nullptr);
auto &objectFunctionName = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(objectFunctionName.objectName == "MyObject");
REQUIRE(objectFunctionName.behaviorName == "MyBehavior");
REQUIRE(objectFunctionName.functionName == "");
REQUIRE(objectFunctionName.type == "number|string");
}
SECTION("Unfinished free function name of type string with parentheses") {
auto node = parser.ParseExpression("string", "fun()");
REQUIRE(node != nullptr);
auto &freeFunctionCall = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(freeFunctionCall.objectName == "");
REQUIRE(freeFunctionCall.functionName == "fun");
REQUIRE(freeFunctionCall.type == "string");
}
SECTION("Unfinished free function name of type number with parentheses") {
auto node = parser.ParseExpression("number", "fun()");
REQUIRE(node != nullptr);
auto &freeFunctionCall = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(freeFunctionCall.objectName == "");
REQUIRE(freeFunctionCall.functionName == "fun");
REQUIRE(freeFunctionCall.type == "number");
}
SECTION(
"Unfinished free function name of type number|string with parentheses") {
auto node = parser.ParseExpression("number|string", "fun()");
REQUIRE(node != nullptr);
auto &freeFunctionCall = dynamic_cast<gd::FunctionCallNode &>(*node);
REQUIRE(freeFunctionCall.objectName == "");
REQUIRE(freeFunctionCall.functionName == "fun");
REQUIRE(freeFunctionCall.type == "number|string");
}
SECTION("Invalid function calls") {
{
auto node = parser.ParseExpression("number", "Idontexist(12)");

View File

@@ -2,6 +2,8 @@ namespace gdjs {
declare var admob: any;
export namespace adMob {
const logger = new gdjs.Logger('AdMob');
export enum AdSizeType {
BANNER,
LARGE_BANNER,
@@ -127,13 +129,13 @@ namespace gdjs {
() => {
bannerShowing = true;
bannerLoading = false;
console.info('AdMob banner successfully shown.');
logger.info('AdMob banner successfully shown.');
},
(error) => {
bannerShowing = false;
bannerLoading = false;
bannerErrored = true;
console.error('Error while showing an AdMob banner:', error);
logger.error('Error while showing an AdMob banner:', error);
}
);
};
@@ -190,14 +192,14 @@ namespace gdjs {
})
.then(
() => {
console.info('AdMob interstitial successfully loaded.');
logger.info('AdMob interstitial successfully loaded.');
if (displayWhenLoaded) showInterstitial();
},
(error) => {
interstitialLoading = false;
interstitialReady = false;
interstitialErrored = true;
console.error('Error while loading a interstitial:', error);
logger.error('Error while loading a interstitial:', error);
}
);
};
@@ -216,7 +218,7 @@ namespace gdjs {
(error) => {
interstitialShowing = false;
interstitialErrored = true;
console.error('Error while trying to show an interstitial:', error);
logger.error('Error while trying to show an interstitial:', error);
}
);
};
@@ -270,7 +272,7 @@ namespace gdjs {
})
.then(
() => {
console.info('AdMob reward video successfully loaded.');
logger.info('AdMob reward video successfully loaded.');
if (displayWhenLoaded) showVideo();
},
@@ -278,7 +280,7 @@ namespace gdjs {
videoLoading = false;
videoReady = false;
videoErrored = true;
console.error('Error while loading a reward video:', error);
logger.error('Error while loading a reward video:', error);
}
);
};
@@ -298,7 +300,7 @@ namespace gdjs {
(error) => {
videoShowing = false;
videoErrored = true;
console.error('Error while trying to show a reward video:', error);
logger.error('Error while trying to show a reward video:', error);
}
);
};

View File

@@ -83,6 +83,30 @@ module.exports = {
.setIncludeFile('Extensions/DebuggerTools/debuggertools.js')
.setFunctionName('gdjs.evtTools.debuggerTools.enableDebugDraw');
extension
.addAction(
'ConsoleLog',
_('Log a message to the console'),
_("Logs a message to the debugger's console."),
_(
'Log message _PARAM0_ of type _PARAM1_ to the console in group _PARAM2_'
),
_('Debugger Tools'),
'res/actions/bug32.png',
'res/actions/bug32.png'
)
.addParameter('string', 'Message to log', '', false)
.addParameter(
'stringWithSelector',
'Message type',
'["info", "warning", "error"]',
true
)
.addParameter('string', 'Group of messages', '', true)
.getCodeExtraInformation()
.setIncludeFile('Extensions/DebuggerTools/debuggertools.js')
.setFunctionName('gdjs.evtTools.debuggerTools.log');
return extension;
},
runExtensionSanityTests: function (

View File

@@ -13,6 +13,20 @@ namespace gdjs {
runtimeScene.getGame().pause(true);
};
/**
* Logs a message to the console.
* @param message - The message to log.
* @param type - The type of log (info, warning or error).
* @param group - The group of messages it belongs to.
*/
export const log = function (
message: string,
type: 'info' | 'warning' | 'error',
group: string
) {
gdjs.log(group, message, type, false);
};
/**
* Enable or disable the debug draw.
* @param runtimeScene - The current scene.

View File

@@ -62,7 +62,7 @@ module.exports = {
"JsPlatform/Extensions/orientation_alpha24.png",
"JsPlatform/Extensions/orientation_alpha32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -82,7 +82,7 @@ module.exports = {
"JsPlatform/Extensions/orientation_beta24.png",
"JsPlatform/Extensions/orientation_beta32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -102,7 +102,7 @@ module.exports = {
"JsPlatform/Extensions/orientation_gamma24.png",
"JsPlatform/Extensions/orientation_gamma32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -228,7 +228,7 @@ module.exports = {
"JsPlatform/Extensions/motion_rotation_alpha24.png",
"JsPlatform/Extensions/motion_rotation_alpha32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value (m/s²)"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -248,7 +248,7 @@ module.exports = {
"JsPlatform/Extensions/motion_rotation_beta24.png",
"JsPlatform/Extensions/motion_rotation_beta32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value (m/s²)"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -268,7 +268,7 @@ module.exports = {
"JsPlatform/Extensions/motion_rotation_gamma24.png",
"JsPlatform/Extensions/motion_rotation_gamma32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value (m/s²)"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -288,7 +288,7 @@ module.exports = {
"JsPlatform/Extensions/motion_acceleration_x24.png",
"JsPlatform/Extensions/motion_acceleration_x32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value (m/s²)"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -308,7 +308,7 @@ module.exports = {
"JsPlatform/Extensions/motion_acceleration_y24.png",
"JsPlatform/Extensions/motion_acceleration_y32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value (m/s²)"))
.getCodeExtraInformation()
.setIncludeFile(
@@ -328,7 +328,7 @@ module.exports = {
"JsPlatform/Extensions/motion_acceleration_z24.png",
"JsPlatform/Extensions/motion_acceleration_z32.png"
)
.addParameter("relationalOperator", _("Sign of the test"))
.addParameter("relationalOperator", _("Sign of the test"), "number")
.addParameter("expression", _("Value (m/s²)"))
.getCodeExtraInformation()
.setIncludeFile(

View File

@@ -1,6 +1,8 @@
// @ts-nocheck - Weird usage of `this` in this file. Should be refactored.
namespace gdjs {
const logger = new gdjs.Logger('Dialogue tree');
gdjs.dialogueTree = {};
gdjs.dialogueTree.runner = new bondage.Runner();
@@ -21,7 +23,7 @@ namespace gdjs {
gdjs.dialogueTree.startFrom(startDialogueNode);
}
} catch (e) {
console.error(e);
logger.error('Error while loading from scene variable: ', e);
}
};
@@ -42,10 +44,7 @@ namespace gdjs {
.getJsonManager()
.loadJson(jsonResourceName, function (error, content) {
if (error) {
console.error(
'An error happened while loading JSON resource:',
error
);
logger.error('An error happened while loading JSON resource:', error);
} else {
if (!content) {
return;
@@ -54,7 +53,7 @@ namespace gdjs {
try {
gdjs.dialogueTree.runner.load(gdjs.dialogueTree.yarnData);
} catch (error) {
console.error(
logger.error(
'An error happened while loading parsing the dialogue tree data:',
error
);
@@ -155,7 +154,7 @@ namespace gdjs {
this.clipTextEnd >= this.dialogueText.length
) {
if (gdjs.dialogueTree.getVariable('debug')) {
console.warn(
logger.warn(
'Scroll completed:',
this.clipTextEnd,
'/',
@@ -244,7 +243,7 @@ namespace gdjs {
gdjs.dialogueTree.pauseScrolling = false;
commandCalls.splice(index, 1);
if (gdjs.dialogueTree.getVariable('debug')) {
console.info('CMD:', call);
logger.info('CMD:', call);
}
}, parseInt(call.params[1], 10));
}
@@ -252,7 +251,7 @@ namespace gdjs {
gdjs.dialogueTree.commandParameters = call.params;
commandCalls.splice(index, 1);
if (gdjs.dialogueTree.getVariable('debug')) {
console.info('CMD:', call);
logger.info('CMD:', call);
}
return true;
}
@@ -366,7 +365,7 @@ namespace gdjs {
this.dialogueData = this.dialogue.next().value;
gdjs.dialogueTree.goToNextDialogueLine();
} catch (error) {
console.error(
logger.error(
`An error happened when trying to access the dialogue branch!`,
error
);
@@ -562,7 +561,7 @@ namespace gdjs {
this.selectedOption = -1;
this.selectedOptionUpdated = false;
if (gdjs.dialogueTree.getVariable('debug')) {
console.info('parsing:', this.dialogueData);
logger.info('Parsing:', this.dialogueData);
}
if (!this.dialogueData) {
gdjs.dialogueTree.stopRunningDialogue();
@@ -739,7 +738,7 @@ namespace gdjs {
* @param key The name of the variable you want to get the value of
*/
gdjs.dialogueTree.getVariable = function (key: string) {
if (this.dialogueIsRunning && key in this.runner.variables.data) {
if (this.runner.variables && key in this.runner.variables.data) {
return this.runner.variables.get(key);
}
return '';
@@ -754,7 +753,7 @@ namespace gdjs {
key: string,
value: string | boolean | number
) {
if (this.dialogueIsRunning && key in this.runner.variables.data) {
if (this.runner.variables && key in this.runner.variables.data) {
return this.runner.variables.get(key) === value;
}
return false;
@@ -797,7 +796,7 @@ namespace gdjs {
gdjs.dialogueTree.loadState = function (inputVariable: gdjs.Variable) {
const loadedState = inputVariable.toJSObject();
if (!loadedState) {
console.error('Load state variable is empty:', inputVariable);
logger.error('Load state variable is empty:', inputVariable);
return;
}
try {
@@ -808,7 +807,7 @@ namespace gdjs {
gdjs.dialogueTree.runner.variables.set(key, value);
});
} catch (e) {
console.error('Failed to load state from variable:', inputVariable, e);
logger.error('Failed to load state from variable:', inputVariable, e);
}
};

View File

@@ -1,5 +1,6 @@
//A simple PIXI filter doing some color changes
namespace gdjs {
const logger = new gdjs.Logger('Dummy effect');
import PIXI = GlobalPIXIModule.PIXI;
const DummyPixiFilter = function () {
@@ -46,7 +47,7 @@ namespace gdjs {
// `effectData.stringParameters.someImage`
// `effectData.stringParameters.someColor`
// `effectData.booleanParameters.someBoolean`
console.info(
logger.info(
'The PIXI texture found for the Dummy Effect (not actually used):',
(layer
.getRuntimeScene()

View File

@@ -1,4 +1,6 @@
namespace gdjs {
const logger = new gdjs.Logger('Dummy behavior');
/**
* The DummyRuntimeBehavior changes a variable in the object that is owning
* it, at every tick before events are run, to set it to the string that was
@@ -20,7 +22,7 @@ namespace gdjs {
this._textToSet = behaviorData.property1;
// You can also run arbitrary code at the creation of the behavior:
console.log('DummyRuntimeBehavior was created for object:', owner);
logger.log('DummyRuntimeBehavior was created for object:', owner);
}
updateFromBehaviorData(oldBehaviorData, newBehaviorData): boolean {

View File

@@ -1,4 +1,6 @@
namespace gdjs {
const logger = new gdjs.Logger('Dummy object');
/**
* A dummy object doing showing a text on screen.
* @ignore
@@ -126,9 +128,9 @@ namespace gdjs {
* A dummy method that can be called from events
*/
myMethod(number1: float, text1: string) {
console.log('Congrats, this method was called on a DummyRuntimeObject');
console.log('Here is the object:', this);
console.log('Here are the arguments passed from events:', number1, text1);
logger.log('Congrats, this method was called on a DummyRuntimeObject');
logger.log('Here is the object:', this);
logger.log('Here are the arguments passed from events:', number1, text1);
}
}
gdjs.registerObject(

View File

@@ -1,4 +1,5 @@
namespace gdjs {
const logger = new gdjs.Logger('Dummy behavior (with shared data)');
export class DummyWithSharedDataRuntimeBehavior extends gdjs.RuntimeBehavior {
_textToSet: string;
@@ -20,11 +21,11 @@ namespace gdjs {
this._textToSet = (sharedData as any).sharedProperty1;
// You can also run arbitrary code at the creation of the behavior:
console.log(
logger.log(
'DummyWithSharedDataRuntimeBehavior was created for object:',
owner
);
console.log('The shared data are:', sharedData);
logger.log('The shared data are:', sharedData);
}
updateFromBehaviorData(oldBehaviorData, newBehaviorData): boolean {

View File

@@ -1,4 +1,6 @@
namespace gdjs {
const logger = new gdjs.Logger('Example extension');
export namespace evtTools {
/**
* This is an example of some functions that can be used through events.
@@ -24,7 +26,7 @@ namespace gdjs {
* that will be called at this moment.
*/
gdjs.registerRuntimeSceneLoadedCallback(function (runtimeScene) {
console.log('A gdjs.RuntimeScene was loaded:', runtimeScene);
logger.log('A gdjs.RuntimeScene was loaded:', runtimeScene);
});
/**
@@ -32,7 +34,7 @@ namespace gdjs {
* that will be called at this moment.
*/
gdjs.registerRuntimeSceneUnloadedCallback(function (runtimeScene) {
console.log('A gdjs.RuntimeScene was unloaded:', runtimeScene);
logger.log('A gdjs.RuntimeScene was unloaded:', runtimeScene);
});
/**
@@ -42,7 +44,7 @@ namespace gdjs {
runtimeScene,
runtimeObject
) {
console.log(
logger.log(
'A gdjs.RuntimeObject was deleted from a gdjs.RuntimeScene:',
runtimeScene,
runtimeObject
@@ -50,7 +52,7 @@ namespace gdjs {
});
// Finally, note that you can also simply run code here. Most of the time you shouldn't need it though.
console.log(
logger.log(
'gdjs.exampleJsExtension was created, with myGlobalString containing:' +
myGlobalString
);

View File

@@ -1,4 +1,5 @@
namespace gdjs {
const logger = new gdjs.Logger('Facebook instant games');
export namespace evtTools {
export namespace facebookInstantGames {
export let _preloadedInterstitial: any = null;
@@ -153,12 +154,12 @@ namespace gdjs {
.then(function () {
gdjs.evtTools.facebookInstantGames._preloadedInterstitialLoading = false;
gdjs.evtTools.facebookInstantGames._preloadedInterstitialLoaded = true;
console.info('Facebook Instant Games interstitial preloaded.');
logger.info('Facebook Instant Games interstitial preloaded.');
})
.catch(function (err) {
gdjs.evtTools.facebookInstantGames._preloadedInterstitialLoading = false;
gdjs.evtTools.facebookInstantGames._preloadedInterstitialLoaded = false;
console.error('Interstitial failed to preload: ' + err.message);
logger.error('Interstitial failed to preload: ' + err.message);
errorVariable.setString(err.message || 'Unknown error');
});
};
@@ -173,10 +174,10 @@ namespace gdjs {
gdjs.evtTools.facebookInstantGames._preloadedInterstitial
.showAsync()
.then(function () {
console.info('Facebook Instant Games interstitial shown.');
logger.info('Facebook Instant Games interstitial shown.');
})
.catch(function (err) {
console.error('Interstitial failed to show: ' + err.message);
logger.error('Interstitial failed to show: ' + err.message);
errorVariable.setString(err.message || 'Unknown error');
})
.then(function () {
@@ -207,12 +208,12 @@ namespace gdjs {
.then(function () {
gdjs.evtTools.facebookInstantGames._preloadedRewardedVideoLoading = false;
gdjs.evtTools.facebookInstantGames._preloadedRewardedVideoLoaded = true;
console.info('Facebook Instant Games rewarded video preloaded.');
logger.info('Facebook Instant Games rewarded video preloaded.');
})
.catch(function (err) {
gdjs.evtTools.facebookInstantGames._preloadedRewardedVideoLoading = false;
gdjs.evtTools.facebookInstantGames._preloadedRewardedVideoLoaded = false;
console.error('Rewarded video failed to preload: ' + err.message);
logger.error('Rewarded video failed to preload: ' + err.message);
errorVariable.setString(err.message || 'Unknown error');
});
};
@@ -227,10 +228,10 @@ namespace gdjs {
gdjs.evtTools.facebookInstantGames._preloadedRewardedVideo
.showAsync()
.then(function () {
console.info('Facebook Instant Games rewarded video shown.');
logger.info('Facebook Instant Games rewarded video shown.');
})
.catch(function (err) {
console.error('Rewarded video failed to show: ' + err.message);
logger.error('Rewarded video failed to show: ' + err.message);
errorVariable.setString(err.message || 'Unknown error');
})
.then(function () {
@@ -242,7 +243,7 @@ namespace gdjs {
return gdjs.evtTools.facebookInstantGames._preloadedRewardedVideoLoaded;
};
if (typeof FBInstant === 'undefined' && typeof window !== 'undefined') {
console.log('Creating a mocked version of Facebook Instant Games.');
logger.log('Creating a mocked version of Facebook Instant Games.');
/**
* A mocked Leaderboard, part of the mock of FBInstant.
@@ -295,7 +296,7 @@ namespace gdjs {
showAsync(): Promise<void> {
if (this._isLoaded) {
console.info(
logger.info(
'In a real Instant Game, a video reward should have been shown to the user.'
);
return Promise.resolve();
@@ -318,7 +319,7 @@ namespace gdjs {
showAsync(): Promise<void> {
if (this._isLoaded) {
console.info(
logger.info(
'In a real Instant Game, an interstitial should have been shown to the user.'
);
return Promise.resolve();

View File

@@ -1,4 +1,5 @@
namespace gdjs {
const logger = new gdjs.Logger('Filesystem');
export namespace fileSystem {
// The Node.js path module, or null if it can't be loaded.
export let _path: any = null;
@@ -203,7 +204,7 @@ namespace gdjs {
fileSystem.mkdirSync(directory);
result = 'ok';
} catch (err) {
console.error(
logger.error(
"Unable to create directory at: '" + directory + "': ",
err
);
@@ -228,7 +229,7 @@ namespace gdjs {
fileSystem.writeFile(savePath, text, 'utf8', (err) => {
resultVar.setString('ok');
if (err) {
console.error(
logger.error(
"Unable to save the text to path: '" + savePath + "': ",
err
);
@@ -256,7 +257,7 @@ namespace gdjs {
fileSystem.writeFileSync(savePath, text, 'utf8');
result = 'ok';
} catch (err) {
console.error(
logger.error(
"Unable to save the text to path: '" + savePath + "': ",
err
);
@@ -287,7 +288,7 @@ namespace gdjs {
);
result = 'ok';
} catch (err) {
console.error(
logger.error(
"Unable to save the variable to path: '" + savePath + "': ",
err
);
@@ -316,7 +317,7 @@ namespace gdjs {
(err) => {
resultVar.setString('ok');
if (err) {
console.error(
logger.error(
"Unable to save the variable to path: '" + savePath + "': ",
err
);
@@ -348,7 +349,7 @@ namespace gdjs {
result = 'ok';
}
} catch (err) {
console.error(
logger.error(
"Unable to load the file at path: '" + loadPath + "': ",
err
);
@@ -378,7 +379,7 @@ namespace gdjs {
result = 'ok';
}
} catch (err) {
console.error(
logger.error(
"Unable to load variable from the file at path: '" +
loadPath +
"': ",
@@ -408,7 +409,7 @@ namespace gdjs {
resultVar.setString('ok');
}
if (err) {
console.error(
logger.error(
"Unable to load variable from the file at path: '" +
loadPath +
"': ",
@@ -439,7 +440,7 @@ namespace gdjs {
resultVar.setString('ok');
}
if (err) {
console.error(
logger.error(
"Unable to load the file at path: '" + loadPath + "': ",
err
);
@@ -465,7 +466,7 @@ namespace gdjs {
fileSystem.unlinkSync(filePath);
result = 'ok';
} catch (err) {
console.error("Unable to delete the file: '" + filePath + "': ", err);
logger.error("Unable to delete the file: '" + filePath + "': ", err);
result = 'error';
}
}
@@ -486,7 +487,7 @@ namespace gdjs {
fileSystem.unlink(filePath, (err) => {
resultVar.setString('ok');
if (err) {
console.error(
logger.error(
"Unable to delete the file: '" + filePath + "': ",
err
);

View File

@@ -1,4 +1,5 @@
namespace gdjs {
const logger = new gdjs.Logger('Firebase');
export namespace evtTools {
/**
* Firebase Event Tools
@@ -23,7 +24,7 @@ namespace gdjs {
.getExtensionProperty('Firebase', 'FirebaseConfig')
);
} catch (e) {
console.error('The Firebase configuration is invalid! Error: ' + e);
logger.error('The Firebase configuration is invalid! Error: ' + e);
return;
}
if (typeof firebaseConfig !== 'object') return;

View File

@@ -5,12 +5,7 @@ namespace gdjs {
_obstacleRBush: any;
constructor(runtimeScene: gdjs.RuntimeScene) {
this._obstacleRBush = new rbush(9, [
'.owner.getAABB().min[0]',
'.owner.getAABB().min[1]',
'.owner.getAABB().max[0]',
'.owner.getAABB().max[1]',
]);
this._obstacleRBush = new rbush();
}
/**
@@ -35,7 +30,10 @@ namespace gdjs {
* Add a light obstacle to the list of existing obstacles.
*/
addObstacle(obstacle: gdjs.LightObstacleRuntimeBehavior) {
this._obstacleRBush.insert(obstacle);
if (obstacle.currentRBushAABB)
obstacle.currentRBushAABB.updateAABBFromOwner();
else obstacle.currentRBushAABB = new gdjs.BehaviorRBushAABB(obstacle);
this._obstacleRBush.insert(obstacle.currentRBushAABB);
}
/**
@@ -43,7 +41,7 @@ namespace gdjs {
* added before.
*/
removeObstacle(obstacle: gdjs.LightObstacleRuntimeBehavior) {
this._obstacleRBush.remove(obstacle);
this._obstacleRBush.remove(obstacle.currentRBushAABB);
}
/**
@@ -55,7 +53,7 @@ namespace gdjs {
getAllObstaclesAround(
object: gdjs.RuntimeObject,
radius: number,
result: gdjs.LightObstacleRuntimeBehavior[]
result: gdjs.BehaviorRBushAABB<gdjs.LightObstacleRuntimeBehavior>[]
) {
// TODO: This would better be done using the object AABB (getAABB), as (`getCenterX`;`getCenterY`) point
// is not necessarily in the middle of the object (for sprites for example).
@@ -83,6 +81,9 @@ namespace gdjs {
_oldY: float = 0;
_oldWidth: float = 0;
_oldHeight: float = 0;
currentRBushAABB: gdjs.BehaviorRBushAABB<
LightObstacleRuntimeBehavior
> | null = null;
_manager: any;
_registeredInManager: boolean = false;

View File

@@ -1,4 +1,5 @@
namespace gdjs {
const logger = new gdjs.Logger('Light object');
import PIXI = GlobalPIXIModule.PIXI;
/**
@@ -134,7 +135,7 @@ namespace gdjs {
updateMesh(): void {
if (!PIXI.utils.isWebGLSupported()) {
console.warn(
logger.warn(
'This device does not support webgl, which is required for Lighting Extension.'
);
return;
@@ -368,7 +369,9 @@ namespace gdjs {
* @returns the vertices of mesh.
*/
_computeLightVertices(): Array<any> {
const lightObstacles: Array<gdjs.LightObstacleRuntimeBehavior> = [];
const lightObstacles: gdjs.BehaviorRBushAABB<
LightObstacleRuntimeBehavior
>[] = [];
if (this._manager) {
this._manager.getAllObstaclesAround(
this._object,
@@ -393,7 +396,7 @@ namespace gdjs {
const obstaclesCount = lightObstacles.length;
const obstacleHitBoxes = new Array(obstaclesCount);
for (let i = 0; i < obstaclesCount; i++) {
obstacleHitBoxes[i] = lightObstacles[i].owner.getHitBoxes();
obstacleHitBoxes[i] = lightObstacles[i].behavior.owner.getHitBoxes();
}
const obstaclePolygons: Array<any> = [];
obstaclePolygons.push(this._lightBoundingPoly);

View File

@@ -47,8 +47,9 @@ namespace gdjs {
/**
* @returns an iterable on every object linked with objA.
*/
// : Iterable<gdjs.RuntimeObject> in practice
getObjectsLinkedWith(objA: gdjs.RuntimeObject) {
getObjectsLinkedWith(
objA: gdjs.RuntimeObject
): Iterable<gdjs.RuntimeObject> {
if (!this._links.has(objA.id)) {
this._links.set(objA.id, new IterableLinkedObjects());
}
@@ -149,19 +150,20 @@ namespace gdjs {
}
}
class IterableLinkedObjects {
class IterableLinkedObjects implements Iterable<gdjs.RuntimeObject> {
linkedObjectMap: Map<string, gdjs.RuntimeObject[]>;
static emptyItr: Iterator<gdjs.RuntimeObject> = {
next: () => ({ value: undefined, done: true }),
};
constructor() {
this.linkedObjectMap = new Map<string, gdjs.RuntimeObject[]>();
}
[Symbol.iterator]() {
let mapItr = this.linkedObjectMap.entries();
let listItr: IterableIterator<[
number,
gdjs.RuntimeObject
]> = [].entries();
let mapItr = this.linkedObjectMap.values();
let listItr: Iterator<gdjs.RuntimeObject> =
IterableLinkedObjects.emptyItr;
return {
next: () => {
@@ -169,15 +171,12 @@ namespace gdjs {
while (listNext.done) {
const mapNext = mapItr.next();
if (mapNext.done) {
// IteratorReturnResult<gdjs.RuntimeObject> require a defined value
// even though the spec state otherwise.
// So, this class can't be typed as an iterable.
return { value: undefined, done: true };
return listNext;
}
listItr = mapNext.value[1].entries();
listItr = mapNext.value[Symbol.iterator]();
listNext = listItr.next();
}
return { value: listNext.value[1], done: false };
return listNext;
},
};
}

View File

@@ -19,12 +19,7 @@ namespace gdjs {
* @param object The object
*/
constructor(runtimeScene: gdjs.RuntimeScene) {
this._obstaclesRBush = new rbush(9, [
'.owner.getAABB().min[0]',
'.owner.getAABB().min[1]',
'.owner.getAABB().max[0]',
'.owner.getAABB().max[1]',
]);
this._obstaclesRBush = new rbush();
}
/**
@@ -46,7 +41,14 @@ namespace gdjs {
addObstacle(
pathfindingObstacleBehavior: PathfindingObstacleRuntimeBehavior
) {
this._obstaclesRBush.insert(pathfindingObstacleBehavior);
if (pathfindingObstacleBehavior.currentRBushAABB)
pathfindingObstacleBehavior.currentRBushAABB.updateAABBFromOwner();
else
pathfindingObstacleBehavior.currentRBushAABB = new gdjs.BehaviorRBushAABB(
pathfindingObstacleBehavior
);
this._obstaclesRBush.insert(pathfindingObstacleBehavior.currentRBushAABB);
}
/**
@@ -56,7 +58,7 @@ namespace gdjs {
removeObstacle(
pathfindingObstacleBehavior: PathfindingObstacleRuntimeBehavior
) {
this._obstaclesRBush.remove(pathfindingObstacleBehavior);
this._obstaclesRBush.remove(pathfindingObstacleBehavior.currentRBushAABB);
}
/**
@@ -68,7 +70,7 @@ namespace gdjs {
x: float,
y: float,
radius: float,
result: gdjs.PathfindingObstacleRuntimeBehavior[]
result: gdjs.BehaviorRBushAABB<gdjs.PathfindingObstacleRuntimeBehavior>[]
): any {
const searchArea = gdjs.staticObject(
PathfindingObstaclesManager.prototype.getAllObstaclesAround
@@ -100,6 +102,9 @@ namespace gdjs {
_oldHeight: float = 0;
_manager: PathfindingObstaclesManager;
_registeredInManager: boolean = false;
currentRBushAABB: gdjs.BehaviorRBushAABB<
PathfindingObstacleRuntimeBehavior
> | null = null;
constructor(
runtimeScene: gdjs.RuntimeScene,

View File

@@ -3,6 +3,7 @@ GDevelop - Pathfinding Behavior Extension
Copyright (c) 2010-2016 Florian Rival (Florian.Rival@gmail.com)
*/
namespace gdjs {
const logger = new gdjs.Logger('Pathfinding behavior');
/**
* PathfindingRuntimeBehavior represents a behavior allowing objects to
* follow a path computed to avoid obstacles.
@@ -542,7 +543,9 @@ namespace gdjs {
//An array of nodes sorted by their estimate cost (First node = Lower estimate cost).
_openNodes: Node[] = [];
//Used by getNodes to temporarily store obstacles near a position.
_closeObstacles: PathfindingObstacleRuntimeBehavior[] = [];
_closeObstacles: gdjs.BehaviorRBushAABB<
PathfindingObstacleRuntimeBehavior
>[] = [];
//Old nodes constructed in a previous search are stored here to avoid temporary objects (see _freeAllNodes method).
_nodeCache: Node[] = [];
@@ -612,7 +615,7 @@ namespace gdjs {
computePathTo(targetX: float, targetY: float) {
if (this._obstacles === null) {
console.log(
logger.log(
'You tried to compute a path without specifying the obstacles'
);
return;
@@ -783,7 +786,7 @@ namespace gdjs {
this._closeObstacles
);
for (let k = 0; k < this._closeObstacles.length; ++k) {
const obj = this._closeObstacles[k].owner;
const obj = this._closeObstacles[k].behavior.owner;
const topLeftCellX = Math.floor(
(obj.getDrawableX() - this._rightBorder - this._gridOffsetX) /
this._cellWidth
@@ -813,13 +816,13 @@ namespace gdjs {
yPos < bottomRightCellY
) {
objectsOnCell = true;
if (this._closeObstacles[k].isImpassable()) {
if (this._closeObstacles[k].behavior.isImpassable()) {
//The cell is impassable, stop here.
newNode.cost = -1;
break;
} else {
//Superimpose obstacles
newNode.cost += this._closeObstacles[k].getCost();
newNode.cost += this._closeObstacles[k].behavior.getCost();
}
}
}

View File

@@ -1,5 +1,7 @@
namespace gdjs {
export namespace screenshot {
const logger = new gdjs.Logger('Screenshot');
/**
* Save a screenshot of the game.
* @param runtimeScene The scene
@@ -22,13 +24,13 @@ namespace gdjs {
}
fileSystem.writeFile(savePath, content, 'base64', (err) => {
if (err) {
console.error(
logger.error(
'Unable to save the screenshot at path: ' + savePath
);
}
});
} else {
console.error(
logger.error(
'Screenshot are not supported on rendering engines without canvas.'
);
}

View File

@@ -9,6 +9,7 @@ This project is released under the MIT License.
* Victor Levasseur ( Bold/Italic/Underlined styles )
*/
#include "GDCore/Extensions/Metadata/MultipleInstructionMetadata.h"
#include "GDCore/Extensions/PlatformExtension.h"
#include "GDCore/Tools/Localization.h"
#include "TextObject.h"
@@ -73,33 +74,6 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
.SetFunctionName("ChangeFont")
.SetIncludeFile("TextObject/TextObject.h");
obj.AddAction("Size",
_("Size"),
_("Change the size of the text."),
_("the size of the text"),
"",
"res/actions/characterSize24.png",
"res/actions/characterSize.png")
.AddParameter("object", _("Object"), "Text")
.UseStandardOperatorParameters("number")
.SetFunctionName("SetCharacterSize")
.SetGetter("GetCharacterSize")
.SetIncludeFile("TextObject/TextObject.h");
obj.AddCondition("Size",
_("Size"),
_("Compare the size of the text"),
_("the size of the text"),
"",
"res/conditions/characterSize24.png",
"res/conditions/characterSize.png")
.AddParameter("object", _("Object"), "Text")
.UseStandardRelationalOperatorParameters("number")
.SetFunctionName("GetCharacterSize")
.SetIncludeFile("TextObject/TextObject.h");
obj.AddCondition("ScaleX",
_("Scale on X axis"),
_("Compare the scale of the text on the X axis"),
@@ -539,6 +513,21 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
.SetFunctionName("GetAngle")
.SetIncludeFile("TextObject/TextObject.h");
obj.AddExpressionAndConditionAndAction(
"number",
"FontSize",
_("Font size"),
_("the font size of a text object"),
_("the font size"),
"",
"res/conditions/characterSize24.png")
.AddParameter("object", _("Object"), "Text")
.UseStandardParameters("number");
// Support for deprecated "Size" actions/conditions:
obj.AddDuplicatedAction("Size", "Text::SetFontSize").SetHidden();
obj.AddDuplicatedCondition("Size", "Text::FontSize").SetHidden();
obj.AddStrExpression(
"String", _("Text"), _("Text"), _("Text"), "res/texteicon.png")
.AddParameter("object", _("Object"), "Text")

View File

@@ -5,14 +5,12 @@ Copyright (c) 2008-2016 Florian Rival (Florian.Rival@gmail.com)
This project is released under the MIT License.
*/
#if defined(GD_IDE_ONLY)
#include <iostream>
#include "GDCore/Extensions/PlatformExtension.h"
#include "GDCore/Tools/Localization.h"
#include "TextObject.h"
#include <iostream>
#include "GDCore/Tools/Localization.h"
void DeclareTextObjectExtension(gd::PlatformExtension& extension);
/**
@@ -33,204 +31,106 @@ class TextObjectJsExtension : public gd::PlatformExtension {
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
GetAllActionsForObject("TextObject::Text")["TextObject::Scale"]
.SetFunctionName("setScale")
.SetGetter("getScale")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getScale");
GetAllActionsForObject("TextObject::Text")["TextObject::ScaleX"]
.SetFunctionName("setScaleX")
.SetGetter("getScaleX")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getScaleX");
GetAllConditionsForObject("TextObject::Text")["TextObject::ScaleX"]
.SetFunctionName("getScaleX")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getScaleX");
GetAllActionsForObject("TextObject::Text")["TextObject::ScaleY"]
.SetFunctionName("setScaleY")
.SetGetter("getScaleY")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getScaleY");
GetAllConditionsForObject("TextObject::Text")["TextObject::ScaleY"]
.SetFunctionName("getScaleY")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getScaleY");
GetAllActionsForObject("TextObject::Text")["TextObject::String"]
.SetFunctionName("setString")
.SetGetter("getString")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getString");
GetAllConditionsForObject("TextObject::Text")["TextObject::String"]
.SetFunctionName("getString")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getString");
GetAllActionsForObject("TextObject::Text")["TextObject::Text::SetFontSize"]
.SetFunctionName("setCharacterSize")
.SetGetter("getCharacterSize");
GetAllConditionsForObject("TextObject::Text")["TextObject::Text::FontSize"]
.SetFunctionName("getCharacterSize");
GetAllExpressionsForObject("TextObject::Text")["FontSize"]
.SetFunctionName("getCharacterSize");
// Deprecated actions/conditions (use "FontSize"/"SetFontSize" instead):
GetAllActionsForObject("TextObject::Text")["TextObject::Size"]
.SetFunctionName("setCharacterSize")
.SetGetter("getCharacterSize")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getCharacterSize");
GetAllConditionsForObject("TextObject::Text")["TextObject::Size"]
.SetFunctionName("getCharacterSize")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getCharacterSize");
GetAllActionsForObject("TextObject::Text")["TextObject::Angle"]
.SetFunctionName("setAngle")
.SetGetter("getAngle")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getAngle");
GetAllConditionsForObject("TextObject::Text")["TextObject::Angle"]
.SetFunctionName("getAngle")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getAngle");
GetAllActionsForObject("TextObject::Text")["TextObject::Opacity"]
.SetFunctionName("setOpacity")
.SetGetter("getOpacity")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getOpacity");
GetAllConditionsForObject("TextObject::Text")["TextObject::Opacity"]
.SetFunctionName("getOpacity")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getOpacity");
GetAllActionsForObject("TextObject::Text")["TextObject::SetBold"]
.SetFunctionName("setBold")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("setBold");
GetAllConditionsForObject("TextObject::Text")["TextObject::IsBold"]
.SetFunctionName("isBold")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("isBold");
GetAllActionsForObject("TextObject::Text")["TextObject::SetItalic"]
.SetFunctionName("setItalic")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("setItalic");
GetAllConditionsForObject("TextObject::Text")["TextObject::IsItalic"]
.SetFunctionName("isItalic")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("isItalic");
GetAllActionsForObject("TextObject::Text")["TextObject::SetWrapping"]
.SetFunctionName("setWrapping")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("setWrapping");
GetAllConditionsForObject("TextObject::Text")["TextObject::IsWrapping"]
.SetFunctionName("isWrapping")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("isWrapping");
GetAllActionsForObject("TextObject::Text")["TextObject::SetPadding"]
.SetFunctionName("setPadding")
.SetGetter("getPadding")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getPadding");
GetAllConditionsForObject("TextObject::Text")["TextObject::Padding"]
.SetFunctionName("getPadding")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getPadding");
GetAllActionsForObject("TextObject::Text")["TextObject::SetTextAlignment"]
.SetFunctionName("setTextAlignment")
.SetGetter("getTextAlignment")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getTextAlignment");
GetAllConditionsForObject("TextObject::Text")["TextObject::TextAlignment"]
.SetFunctionName("getTextAlignment")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getTextAlignment");
GetAllActionsForObject("TextObject::Text")["TextObject::WrappingWidth"]
.SetFunctionName("setWrappingWidth")
.SetGetter("getWrappingWidth")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetGetter("getWrappingWidth");
GetAllConditionsForObject("TextObject::Text")["TextObject::WrappingWidth"]
.SetFunctionName("getWrappingWidth")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getWrappingWidth");
GetAllExpressionsForObject("TextObject::Text")["Padding"]
.SetFunctionName("getPadding")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getPadding");
GetAllExpressionsForObject("TextObject::Text")["ScaleX"]
.SetFunctionName("getScaleX")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getScaleX");
GetAllExpressionsForObject("TextObject::Text")["ScaleY"]
.SetFunctionName("getScaleY")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getScaleY");
GetAllExpressionsForObject("TextObject::Text")["Opacity"]
.SetFunctionName("getOpacity")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getOpacity");
GetAllExpressionsForObject("TextObject::Text")["Angle"]
.SetFunctionName("getAngle")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getAngle");
GetAllStrExpressionsForObject("TextObject::Text")["String"]
.SetFunctionName("getString")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("getString");
GetAllActionsForObject("TextObject::Text")["TextObject::ChangeColor"]
.SetFunctionName("setColor")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("setColor");
GetAllActionsForObject("TextObject::Text")["TextObject::SetGradient"]
.SetFunctionName("setGradient")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("setGradient");
GetAllActionsForObject("TextObject::Text")["TextObject::SetOutline"]
.SetFunctionName("setOutline")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("setOutline");
GetAllActionsForObject("TextObject::Text")["TextObject::SetShadow"]
.SetFunctionName("setShadow")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("setShadow");
GetAllActionsForObject("TextObject::Text")["TextObject::ShowShadow"]
.SetFunctionName("showShadow")
.SetIncludeFile("Extensions/TextObject/textruntimeobject.js")
.AddIncludeFile(
"Extensions/TextObject/textruntimeobject-pixi-renderer.js");
.SetFunctionName("showShadow");
// Unimplemented actions and conditions:
GetAllActionsForObject("TextObject::Text")["TextObject::Font"]

View File

@@ -224,7 +224,7 @@ namespace gdjs {
/**
* Get the font size of the characters of the object.
*/
getCharacterSize() {
getCharacterSize(): number {
return this._characterSize;
}

View File

@@ -1,4 +1,6 @@
namespace gdjs {
const logger = new gdjs.Logger('Tilemap object');
/**
* The PIXI.js renderer for the Tile map runtime object.
*
@@ -81,7 +83,7 @@ namespace gdjs {
.getJsonManager()
.loadJson(this._object._tilemapJsonFile, (error, tileMapJsonData) => {
if (error) {
console.error(
logger.error(
'An error happened while loading a Tilemap JSON data:',
error
);
@@ -95,7 +97,7 @@ namespace gdjs {
this._object._tilesetJsonFile,
(error, tilesetJsonData) => {
if (error) {
console.error(
logger.error(
'An error happened while loading Tileset JSON data:',
error
);

View File

@@ -1,4 +1,6 @@
namespace gdjs {
const logger = new gdjs.Logger('Video object PIXI renderer');
import PIXI = GlobalPIXIModule.PIXI;
/**
@@ -160,7 +162,7 @@ namespace gdjs {
.then(() => {})
.catch(() => {
// Autoplay was prevented.
console.warn(
logger.warn(
'The video did not start because: video is invalid or no interaction with the game has been captured before (this is blocked by the navigator: https://goo.gl/xX8pDD)'
);
});

View File

@@ -27,6 +27,10 @@ MouseExtension::MouseExtension() {
"gdjs.evtTools.input.isMouseButtonPressed"); // Deprecated
GetAllConditions()["MouseButtonReleased"].SetFunctionName(
"gdjs.evtTools.input.isMouseButtonReleased");
GetAllConditions()["MouseButtonFromTextPressed"].SetFunctionName(
"gdjs.evtTools.input.isMouseButtonPressed");
GetAllConditions()["MouseButtonFromTextReleased"].SetFunctionName(
"gdjs.evtTools.input.isMouseButtonReleased");
GetAllActions()["CacheSouris"].SetFunctionName(
"gdjs.evtTools.input.hideCursor");
GetAllActions()["MontreSouris"].SetFunctionName(

View File

@@ -527,6 +527,7 @@ void ExporterHelper::AddLibsInclude(bool pixiRenderers,
// First, do not forget common includes (they must be included before events
// generated code files).
InsertUnique(includesFiles, "libs/jshashtable.js");
InsertUnique(includesFiles, "logger.js");
InsertUnique(includesFiles, "gd.js");
InsertUnique(includesFiles, "libs/rbush.js");
InsertUnique(includesFiles, "inputmanager.js");

View File

@@ -4,6 +4,7 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('Storage');
export namespace evtTools {
/**
* Functions to store and load basic values (strings or numbers), organized
@@ -30,10 +31,10 @@ namespace gdjs {
}
}
} catch (error) {
console.warn('Unable to get access to the localStorage: ', error);
logger.error('Unable to get access to the localStorage: ' + error);
}
if (!localStorage) {
console.warn(
logger.error(
"Storage actions won't work as no localStorage was found."
);
}
@@ -64,9 +65,8 @@ namespace gdjs {
serializedString = localStorage.getItem('GDJS_' + name);
}
} catch (error) {
console.warn(
'Unable to load data from localStorage for "' + name + '":',
error
logger.error(
'Unable to load data from localStorage for "' + name + '": ' + error
);
}
let jsObject = {};
@@ -75,9 +75,11 @@ namespace gdjs {
jsObject = JSON.parse(serializedString);
}
} catch (error) {
console.warn(
'Unable to load data from "' + name + '" - data is not valid JSON:',
error
logger.error(
'Unable to load data from "' +
name +
'" - data is not valid JSON: ' +
error
);
}
loadedObjects.put(name, jsObject);
@@ -107,9 +109,8 @@ namespace gdjs {
localStorage.setItem('GDJS_' + name, serializedString);
}
} catch (error) {
console.warn(
'Unable to save data to localStorage for "' + name + '":',
error
logger.error(
'Unable to save data to localStorage for "' + name + '": ' + error
);
}
loadedObjects.remove(name);

View File

@@ -4,6 +4,8 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('Font manager');
/**
* FontFaceObserverFontManager loads fonts (using `FontFace` or `fontfaceobserver` library)
* from the game resources (see `loadFonts`), and allow to access to
@@ -198,7 +200,7 @@ namespace gdjs {
onFontLoaded(fontFamily, fontResources);
},
function (error) {
console.error(
logger.error(
'Error loading font resource "' +
fontResources[0].name +
'" (file: ' +

View File

@@ -9,6 +9,8 @@
* @namespace gdjs
*/
namespace gdjs {
const logger = new gdjs.Logger('Engine runtime');
/**
* Contains functions used by events (this is a convention only, functions can actually
* be anywhere).
@@ -334,7 +336,7 @@ namespace gdjs {
* @private
*/
export const registerGlobalCallbacks = function (): void {
console.warn(
logger.warn(
"You're calling gdjs.registerGlobalCallbacks. This method is now useless and you must not call it anymore."
);
};
@@ -367,7 +369,7 @@ namespace gdjs {
if (name !== undefined && gdjs.objectsTypes.containsKey(name))
return gdjs.objectsTypes.get(name);
console.warn('Object type "' + name + '" was not found.');
logger.warn('Object type "' + name + '" was not found.');
return gdjs.objectsTypes.get(''); //Create a base empty runtime object.
};
@@ -382,7 +384,7 @@ namespace gdjs {
if (name !== undefined && gdjs.behaviorsTypes.containsKey(name))
return gdjs.behaviorsTypes.get(name);
console.warn('Behavior type "' + name + '" was not found.');
logger.warn('Behavior type "' + name + '" was not found.');
return gdjs.behaviorsTypes.get(''); //Create a base empty runtime behavior.
};

View File

@@ -5,12 +5,14 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('Audio manager');
const HowlParameters: HowlOptions = {
preload: true,
onplayerror: (_, error) =>
console.error("Can't play an audio file: ", error),
logger.error("Can't play an audio file: " + error),
onloaderror: (_, error) =>
console.error('Error while loading an audio file: ', error),
logger.error('Error while loading an audio file: ' + error),
};
/**
@@ -682,9 +684,8 @@ namespace gdjs {
let loadedCount: integer = 0;
const onLoad = (_?: any, error?: string) => {
if (error)
console.error(
'There was an error while loading an audio file:',
error
logger.warn(
'There was an error while preloading an audio file: ' + error
);
loadedCount++;

View File

@@ -4,6 +4,7 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('JSON Manager');
type JsonManagerOnProgressCallback = (
loadedCount: integer,
totalCount: integer
@@ -69,7 +70,7 @@ namespace gdjs {
const onLoad: JsonManagerRequestCallback = function (error) {
if (error) {
console.error('Error while preloading a json resource:' + error);
logger.error('Error while preloading a json resource:' + error);
}
loaded++;
if (loaded === jsonResources.length) {

54
GDJS/Runtime/logger.ts Normal file
View File

@@ -0,0 +1,54 @@
namespace gdjs {
const _console = {
info: console.log,
warning: console.warn,
error: console.error,
};
/**
* Internal method for logging messages to the JS console or the Debugger if available.
* Should be used in engine code or extensions, console.log is fine for JS events.
*/
export let log = (
group: string,
message: string,
type: 'info' | 'warning' | 'error' = 'info',
internal = true
): void => {
const logger = _console[type] || _console.info;
logger(`[${group}] ${message}`);
};
function objectsToString(objects: any[]): string {
return objects.reduce(
(accumulator, value) => accumulator + value.toString(),
''
);
}
/**
* A Console API like class for logging using GDevelop's logger.
*/
export class Logger {
private readonly group: string;
constructor(group: string) {
this.group = group;
}
log(...messages: any[]): void {
this.info(...messages);
}
info(...messages: any[]): void {
log(this.group, objectsToString(messages), 'info');
}
warn(...messages: any[]): void {
log(this.group, objectsToString(messages), 'warning');
}
error(...messages: any[]): void {
log(this.group, objectsToString(messages), 'error');
}
}
}

View File

@@ -4,6 +4,8 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('Bitmap text');
import PIXI = GlobalPIXIModule.PIXI;
const defaultBitmapFontKey = 'GDJS-DEFAULT-BITMAP-FONT';
@@ -152,7 +154,7 @@ namespace gdjs {
}
if (!this._pixiBitmapFontsInUse[bitmapFontInstallKey]) {
console.error(
logger.warn(
'BitmapFont with name ' +
bitmapFontInstallKey +
' was tried to be released but was never marked as used.'
@@ -176,7 +178,8 @@ namespace gdjs {
const oldestUnloadedPixiBitmapFontName = this._pixiBitmapFontsToUninstall.shift() as string;
PIXI.BitmapFont.uninstall(oldestUnloadedPixiBitmapFontName);
console.log(
logger.log(
'Bitmap Text',
'Uninstalled BitmapFont "' +
oldestUnloadedPixiBitmapFontName +
'" from memory.'
@@ -209,7 +212,7 @@ namespace gdjs {
// First get the font data:
const fontData = this._loadedFontsData[bitmapFontResourceName];
if (!fontData) {
console.warn(
logger.warn(
'Could not find Bitmap Font for resource named "' +
bitmapFontResourceName +
'". The default font will be used.'
@@ -231,7 +234,7 @@ namespace gdjs {
this._markBitmapFontAsUsed(bitmapFontInstallKey);
return bitmapFont;
} catch (error) {
console.warn(
logger.error(
'Could not load the Bitmap Font for resource named "' +
bitmapFontResourceName +
'". The default font will be used. Error is: ' +
@@ -264,7 +267,7 @@ namespace gdjs {
this._loadedFontsData[bitmapFontResource.name] = fontData;
})
.catch((error) => {
console.error(
logger.error(
"Can't fetch the bitmap font file " +
bitmapFontResource.file +
', error: ' +

View File

@@ -141,6 +141,17 @@ namespace gdjs {
return true;
}
/**
* Remove all effects from a PixiJS DisplayObject.
* @param rendererObject The renderer object.
*/
clearEffects(rendererObject: PIXI.DisplayObject): boolean {
if (rendererObject) {
rendererObject.filters = [];
}
return true;
}
/**
* Update the parameter of an effect (with a number).
* @param rendererEffects The collection of PixiJS filters.

View File

@@ -1,4 +1,5 @@
namespace gdjs {
const logger = new gdjs.Logger('Filters');
import PIXI = GlobalPIXIModule.PIXI;
export namespace PixiFiltersTools {
@@ -61,7 +62,7 @@ namespace gdjs {
filterCreator: FilterCreator
) {
if (_filterCreators.hasOwnProperty(filterName)) {
console.warn(
logger.warn(
'Filter "' +
filterName +
'" was already registered in gdjs.PixiFiltersTools. Replacing it with the new one.'

View File

@@ -4,10 +4,11 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('PIXI Image manager');
import PIXI = GlobalPIXIModule.PIXI;
const logFileLoadingError = (file: string, error: Error | undefined) => {
console.error(
logger.error(
'Unable to load file ' + file + ' with error:',
error ? error : '(unknown error)'
);
@@ -88,7 +89,7 @@ namespace gdjs {
if (texture.valid) {
return texture;
} else {
console.error(
logger.error(
'Texture for ' +
resourceName +
' is not valid anymore (or never was).'
@@ -107,13 +108,13 @@ namespace gdjs {
);
if (!resource) {
console.warn(
logger.warn(
'Unable to find texture for resource "' + resourceName + '".'
);
return this._invalidTexture;
}
console.log('Loading texture for resource "' + resourceName + '"...');
logger.log('Loading texture for resource "' + resourceName + '"...');
const file = resource.file;
const texture = PIXI.Texture.from(file).on('error', (error) => {
logFileLoadingError(file, error);
@@ -145,14 +146,14 @@ namespace gdjs {
);
if (!resource) {
console.warn(
logger.warn(
'Unable to find video texture for resource "' + resourceName + '".'
);
return this._invalidTexture;
}
const file = resource.file;
console.log(
logger.log(
'Loading video texture for resource "' + resourceName + '"...'
);
const texture = PIXI.Texture.from(file).on('error', (error) => {

View File

@@ -1,4 +1,6 @@
namespace gdjs {
const logger = new gdjs.Logger('PIXI game renderer');
import PIXI = GlobalPIXIModule.PIXI;
/**
@@ -146,7 +148,7 @@ namespace gdjs {
window.screen.orientation.lock(gameOrientation).catch(() => {});
}
} catch (error) {
console.error('Unexpected error while setting up orientation: ', error);
logger.error('Unexpected error while setting up orientation: ', error);
}
}
@@ -262,7 +264,7 @@ namespace gdjs {
browserWindow.setContentSize(width, height);
}
} else {
console.warn("Window size can't be changed on this platform.");
logger.warn("Window size can't be changed on this platform.");
}
}

View File

@@ -4,6 +4,33 @@
* This project is released under the MIT License.
*/
namespace gdjs {
/**
* Allow to store a behavior in a RBush (spatial data structure).
* Because this duplicates the AABB, this ensures the RBush AABB
* stays the same even if the underlying object is moved
* (in which case the behavior is responsible for removing/adding
* back/updating this BehaviorRBushAABB).
*/
export class BehaviorRBushAABB<T extends RuntimeBehavior> {
minX: float = 0;
minY: float = 0;
maxX: float = 0;
maxY: float = 0;
behavior: T;
constructor(behavior: T) {
this.behavior = behavior;
this.updateAABBFromOwner();
}
updateAABBFromOwner() {
this.minX = this.behavior.owner.getAABB().min[0];
this.minY = this.behavior.owner.getAABB().min[1];
this.maxX = this.behavior.owner.getAABB().max[0];
this.maxY = this.behavior.owner.getAABB().max[1];
}
}
/**
* RuntimeBehavior represents a behavior being used by a RuntimeObject.
*/

View File

@@ -4,6 +4,8 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('Game manager');
/** Identify a script file, with its content hash (useful for hot-reloading). */
export type RuntimeGameOptionsScriptFile = {
/** The path for this script file. */
@@ -238,7 +240,7 @@ namespace gdjs {
}
}
if (scene === null) {
console.warn('The game has no scene called "' + sceneName + '"');
logger.error('The game has no scene called "' + sceneName + '"');
}
return scene;
}
@@ -541,73 +543,78 @@ namespace gdjs {
* Start the game loop, to be called once assets are loaded.
*/
startGameLoop() {
if (!this.hasScene()) {
console.log('The game has no scene.');
return;
try {
if (!this.hasScene()) {
logger.error('The game has no scene.');
return;
}
this._forceGameResolutionUpdate();
//Load the first scene
const firstSceneName = this._data.firstLayout;
this._sceneStack.push(
this.hasScene(firstSceneName)
? firstSceneName
: // @ts-ignore - no risk of null object.
this.getSceneData().name,
this._injectExternalLayout
);
//Uncomment to profile the first x frames of the game.
// var x = 500;
// var startTime = Date.now();
// console.profile("Stepping for " + x + " frames")
// for(var i = 0; i < x; ++i) {
// this._sceneStack.step(16);
// }
// console.profileEnd();
// var time = Date.now() - startTime;
// logger.log("Took", time, "ms");
// return;
//The standard game loop
const that = this;
let accumulatedElapsedTime = 0;
this._renderer.startGameLoop(function (lastCallElapsedTime) {
if (that._paused) {
return true;
}
// Skip the frame if we rendering frames too fast
accumulatedElapsedTime += lastCallElapsedTime;
if (
that._maxFPS > 0 &&
1000.0 / accumulatedElapsedTime > that._maxFPS + 7
) {
// Only skip frame if the framerate is 7 frames above the maximum framerate.
// Most browser/engines will try to run at slightly more than 60 frames per second.
// If game is set to have a maximum FPS to 60, then one out of two frames will be dropped.
// Hence, we use a 7 frames margin to ensure that we're not skipping frames too much.
return true;
}
const elapsedTime = accumulatedElapsedTime;
accumulatedElapsedTime = 0;
//Manage resize events.
if (that._notifyScenesForGameResolutionResize) {
that._sceneStack.onGameResolutionResized();
that._notifyScenesForGameResolutionResize = false;
}
//Render and step the scene.
if (that._sceneStack.step(elapsedTime)) {
that.getInputManager().onFrameEnded();
return true;
}
return false;
});
setTimeout(() => {
this._setupSessionMetrics();
}, 10000);
} catch (e) {
logger.error('Internal crash: ' + e);
throw e;
}
this._forceGameResolutionUpdate();
//Load the first scene
const firstSceneName = this._data.firstLayout;
this._sceneStack.push(
this.hasScene(firstSceneName)
? firstSceneName
: // @ts-ignore - no risk of null object.
this.getSceneData().name,
this._injectExternalLayout
);
//Uncomment to profile the first x frames of the game.
// var x = 500;
// var startTime = Date.now();
// console.profile("Stepping for " + x + " frames")
// for(var i = 0; i < x; ++i) {
// this._sceneStack.step(16);
// }
// console.profileEnd();
// var time = Date.now() - startTime;
// console.log("Took", time, "ms");
// return;
//The standard game loop
const that = this;
let accumulatedElapsedTime = 0;
this._renderer.startGameLoop(function (lastCallElapsedTime) {
if (that._paused) {
return true;
}
// Skip the frame if we rendering frames too fast
accumulatedElapsedTime += lastCallElapsedTime;
if (
that._maxFPS > 0 &&
1000.0 / accumulatedElapsedTime > that._maxFPS + 7
) {
// Only skip frame if the framerate is 7 frames above the maximum framerate.
// Most browser/engines will try to run at slightly more than 60 frames per second.
// If game is set to have a maximum FPS to 60, then one out of two frames will be dropped.
// Hence, we use a 7 frames margin to ensure that we're not skipping frames too much.
return true;
}
const elapsedTime = accumulatedElapsedTime;
accumulatedElapsedTime = 0;
//Manage resize events.
if (that._notifyScenesForGameResolutionResize) {
that._sceneStack.onGameResolutionResized();
that._notifyScenesForGameResolutionResize = false;
}
//Render and step the scene.
if (that._sceneStack.step(elapsedTime)) {
that.getInputManager().onFrameEnded();
return true;
}
return false;
});
setTimeout(() => {
this._setupSessionMetrics();
}, 10000);
}
/**
@@ -674,6 +681,14 @@ namespace gdjs {
},
}),
})
.then((response) => {
// Ensure the session is correctly created to avoid sending hits that will fail.
if (!response.ok) {
console.error('Error while creating the session', response);
throw new Error('Error while creating the session');
}
return response;
})
.then((response) => response.text())
.then((returnedSessionId) => {
sessionId = returnedSessionId;

View File

@@ -181,6 +181,8 @@ namespace gdjs {
this.aabb.max[1] = 0;
this._variables = new gdjs.VariablesContainer(objectData.variables);
this.clearForces();
// Reinitialize behaviors.
this._behaviorsTable.clear();
let i = 0;
for (const len = objectData.behaviors.length; i < len; ++i) {
@@ -196,7 +198,16 @@ namespace gdjs {
}
this._behaviors.length = i;
// Make sure to delete already existing behaviors which are not used anymore.
// Reinitialize effects.
for (let i = 0; i < objectData.effects.length; ++i) {
this._runtimeScene
.getGame()
.getEffectsManager()
.initializeEffect(objectData.effects[i], this._rendererEffects, this);
this.updateAllEffectParameters(objectData.effects[i]);
}
// Make sure to delete existing timers.
this._timers.clear();
}
@@ -291,6 +302,7 @@ namespace gdjs {
for (let j = 0, lenj = this._behaviors.length; j < lenj; ++j) {
this._behaviors[j].onDestroy();
}
this.clearEffects();
}
//Rendering:
@@ -793,6 +805,17 @@ namespace gdjs {
);
}
/**
* Remove all effects.
*/
clearEffects(): boolean {
this._rendererEffects = {};
return this._runtimeScene
.getGame()
.getEffectsManager()
.clearEffects(this.getRendererObject());
}
/**
* Change an effect parameter value (for parameters that are numbers).
* @param name The name of the effect to update.

View File

@@ -4,6 +4,8 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('Scene manager');
/**
* A scene being played, containing instances of objects rendered on screen.
*/
@@ -126,7 +128,7 @@ namespace gdjs {
*/
loadFromScene(sceneData: LayoutData | null) {
if (!sceneData) {
console.error('loadFromScene was called without a scene');
logger.error('loadFromScene was called without a scene');
return;
}
if (this._isLoaded) {
@@ -240,7 +242,7 @@ namespace gdjs {
*/
updateObject(objectData: ObjectData): void {
if (!this.isObjectRegistered(objectData.name)) {
console.warn(
logger.warn(
'Tried to call updateObject for an object that was not registered (' +
objectData.name +
'). Call registerObject first.'
@@ -435,8 +437,8 @@ namespace gdjs {
if (module && module.func) {
this._eventsFunction = module.func;
} else {
console.log(
'Warning: no function found for running logic of scene ' + this._name
logger.warn(
'No function found for running logic of scene ' + this._name
);
this._eventsFunction = function () {};
}
@@ -827,7 +829,7 @@ namespace gdjs {
*/
getObjects(name: string): gdjs.RuntimeObject[] {
if (!this._instances.containsKey(name)) {
console.log(
logger.info(
'RuntimeScene.getObjects: No instances called "' +
name +
'"! Adding it.'
@@ -943,7 +945,7 @@ namespace gdjs {
if (behaviorSharedData) {
return behaviorSharedData;
}
console.error("Can't find shared data for behavior with name:", name);
logger.error("Can't find shared data for behavior with name: " + name);
return null;
}

View File

@@ -1,4 +1,6 @@
namespace gdjs {
const logger = new gdjs.Logger('Scene stack');
/**
* Hold the stack of scenes ({@link gdjs.RuntimeScene}) being played.
*/
@@ -49,7 +51,7 @@ namespace gdjs {
} else if (request === gdjs.SceneChangeRequest.CLEAR_SCENES) {
this.replace(currentScene.getRequestedScene(), true);
} else {
console.error('Unrecognized change in scene stack.');
logger.error('Unrecognized change in scene stack: ' + request);
return false;
}
}

View File

@@ -563,7 +563,7 @@ namespace gdjs {
return super.updateHitBoxes();
}
//console.log("Update for "+this.name); //Uncomment to track updates
//logger.log("Update for "+this.name); //Uncomment to track updates
//(and in particular be sure that unnecessary update are avoided).
//Update the current hitboxes with the frame custom hit boxes

View File

@@ -4,6 +4,8 @@
* This project is released under the MIT License.
*/
namespace gdjs {
const logger = new gdjs.Logger('Variables');
/**
* Children of a structure.
*/
@@ -111,7 +113,7 @@ namespace gdjs {
this.setString('null');
} else if (typeof obj === 'number') {
if (Number.isNaN(obj)) {
console.warn('Variables cannot be set to NaN, setting it to 0.');
logger.warn('Variables cannot be set to NaN, setting it to 0.');
this.setNumber(0);
} else {
this.setNumber(obj);
@@ -135,17 +137,22 @@ namespace gdjs {
this.setString(obj.toString());
} else if (typeof obj === 'bigint') {
if (obj > Number.MAX_SAFE_INTEGER)
console.warn(
'Integers bigger than ' +
logger.warn(
'Error while converting JS variable to GDevelop variable: Integers bigger than ' +
Number.MAX_SAFE_INTEGER +
" aren't supported by GDevelop variables, it will be reduced to that size."
);
// @ts-ignore
variable.setNumber(parseInt(obj, 10));
} else if (typeof obj === 'function') {
console.error('Error: Impossible to set variable value to a function.');
logger.error(
'Error while converting JS variable to GDevelop variable: Impossible to set variable value to a function.'
);
} else {
console.error('Cannot identify type of object:', obj);
logger.error(
'Error while converting JS variable to GDevelop variable: Cannot identify type of object ' +
obj
);
}
return this;
}
@@ -161,7 +168,7 @@ namespace gdjs {
try {
var obj = JSON.parse(json);
} catch (e) {
console.error('Unable to parse JSON: ', json, e);
logger.error('Unable to parse JSON: ' + json + e);
return this;
}
this.fromJSObject(obj);

View File

@@ -1,4 +1,5 @@
namespace gdjs {
const logger = new gdjs.Logger('Hot reloader');
export type HotReloaderLog = {
message: string;
kind: 'fatal' | 'error' | 'warning' | 'info';
@@ -133,7 +134,7 @@ namespace gdjs {
}
hotReload(): Promise<HotReloaderLog[]> {
console.info('Hot reload started');
logger.info('Hot reload started');
this._runtimeGame.pause(true);
this._logs = [];
@@ -204,7 +205,7 @@ namespace gdjs {
}
})
.then(() => {
console.info('Hot reload finished with logs:', this._logs);
logger.info('Hot reload finished with logs:', this._logs);
this._runtimeGame.pause(false);
return this._logs;
});

View File

@@ -1,8 +1,21 @@
namespace gdjs {
const logger = new gdjs.Logger('Debugger client');
/**
* An client side implementation of the Debugger
*/
export interface IDebuggerClient {
/**
* Logs a value in the debugger console.
* @param message - The value to log inside the console.
* @param additionalData - Additional data about the log.
*/
log(
group: string,
message: string,
type: 'info' | 'warning' | 'error',
internal: boolean
): void;
/**
* Update a value, specified by a path starting from the {@link RuntimeGame} instance.
* @param path - The path to the variable, starting from {@link RuntimeGame}.
@@ -79,7 +92,7 @@ namespace gdjs {
this._hotReloader = new gdjs.HotReloader(runtimeGame);
this._ws = null;
if (typeof WebSocket === 'undefined') {
console.log("WebSocket is not defined, debugger won't work");
logger.log("WebSocket is not defined, debugger won't work");
return;
}
const that = this;
@@ -97,26 +110,26 @@ namespace gdjs {
'3030';
this._ws = new WebSocket('ws://' + address + ':' + port + '/');
} catch (e) {
console.log(
logger.log(
"WebSocket could not initialize, debugger/hot-reload won't work (might be because of preview inside web browser)."
);
return;
}
this._ws.onopen = function open() {
console.info('Debugger connection open');
logger.info('Debugger connection open');
};
this._ws.onclose = function close() {
console.info('Debugger connection closed');
logger.info('Debugger connection closed');
};
this._ws.onerror = function errored(error) {
console.warn('Debugger client error:', error);
logger.warn('Debugger client error:', error);
};
this._ws.onmessage = function incoming(message) {
let data: any = null;
try {
data = JSON.parse(message.data);
} catch (e) {
console.info('Debugger received a badly formatted message');
logger.info('Debugger received a badly formatted message');
}
if (data && data.command) {
if (data.command === 'play') {
@@ -146,22 +159,101 @@ namespace gdjs {
that.sendHotReloaderLogs(logs);
});
} else {
console.info(
logger.info(
'Unknown command "' + data.command + '" received by the debugger.'
);
}
} else {
console.info(
'Debugger received a message with badly formatted data.'
);
logger.info('Debugger received a message with badly formatted data.');
}
};
return;
((log, info, debug, warn, error, gdjsLog) => {
// Hook the console logging functions to log to the Debugger as well
console.log = (...messages) => {
log(...messages);
this._consoleLogHook('info', ...messages);
};
console.debug = (...messages) => {
debug(...messages);
this._consoleLogHook('info', ...messages);
};
console.info = (...messages) => {
info(...messages);
this._consoleLogHook('info', ...messages);
};
console.warn = (...messages) => {
warn(...messages);
this._consoleLogHook('warning', ...messages);
};
console.error = (...messages) => {
error(...messages);
this._consoleLogHook('error', ...messages);
};
gdjs.log = (
group: string,
message: string,
type: 'info' | 'warning' | 'error' = 'info',
internal = true
) => {
gdjsLog(group, message, type);
this.log(group, message, type, internal);
};
})(
console.log,
console.info,
console.debug,
console.warn,
console.error,
gdjs.log
);
}
_consoleLogHook(type: 'info' | 'warning' | 'error', ...messages) {
this.log(
'JavaScript',
messages.reduce(
(accumulator, value) => accumulator + value.toString(),
''
),
type,
false
);
}
log(
group: string,
message: string,
type: 'info' | 'warning' | 'error',
internal: boolean
) {
if (!this._ws) {
logger.warn('No connection to debugger opened to send logs');
return;
}
if (this._ws.readyState === 1)
this._ws.send(
JSON.stringify({
command: 'console.log',
payload: {
message,
type,
group,
internal,
timestamp: performance.now(),
},
})
);
}
set(path: string[], newValue: any): boolean {
if (!path || !path.length) {
console.warn('No path specified, set operation from debugger aborted');
logger.warn('No path specified, set operation from debugger aborted');
return false;
}
let object = this._runtimegame;
@@ -169,7 +261,7 @@ namespace gdjs {
while (currentIndex < path.length - 1) {
const key = path[currentIndex];
if (!object || !object[key]) {
console.error('Incorrect path specified. No ' + key + ' in ', object);
logger.error('Incorrect path specified. No ' + key + ' in ', object);
return false;
}
object = object[key];
@@ -186,14 +278,14 @@ namespace gdjs {
newValue = '' + newValue;
}
}
console.log('Updating', path, 'to', newValue);
logger.log('Updating', path, 'to', newValue);
object[path[currentIndex]] = newValue;
return true;
}
call(path: string[], args: any[]): boolean {
if (!path || !path.length) {
console.warn('No path specified, call operation from debugger aborted');
logger.warn('No path specified, call operation from debugger aborted');
return false;
}
let object = this._runtimegame;
@@ -201,24 +293,24 @@ namespace gdjs {
while (currentIndex < path.length - 1) {
const key = path[currentIndex];
if (!object || !object[key]) {
console.error('Incorrect path specified. No ' + key + ' in ', object);
logger.error('Incorrect path specified. No ' + key + ' in ', object);
return false;
}
object = object[key];
currentIndex++;
}
if (!object[path[currentIndex]]) {
console.error('Unable to call', path);
logger.error('Unable to call', path);
return false;
}
console.log('Calling', path, 'with', args);
logger.log('Calling', path, 'with', args);
object[path[currentIndex]].apply(object, args);
return true;
}
sendRuntimeGameDump(): void {
if (!this._ws) {
console.warn(
logger.warn(
'No connection to debugger opened to send RuntimeGame dump'
);
return;
@@ -278,11 +370,11 @@ namespace gdjs {
18
);
const serializationDuration = Date.now() - serializationStartTime;
console.log(
logger.log(
'RuntimeGame serialization took ' + serializationDuration + 'ms'
);
if (serializationDuration > 500) {
console.warn(
logger.warn(
'Serialization took a long time: please check if there is a need to remove some objects from serialization'
);
}
@@ -291,7 +383,7 @@ namespace gdjs {
sendHotReloaderLogs(logs: HotReloaderLog[]): void {
if (!this._ws) {
console.warn('No connection to debugger opened');
logger.warn('No connection to debugger opened');
return;
}
this._ws.send(
@@ -304,7 +396,7 @@ namespace gdjs {
sendProfilerStarted(): void {
if (!this._ws) {
console.warn('No connection to debugger opened');
logger.warn('No connection to debugger opened');
return;
}
this._ws.send(
@@ -317,7 +409,7 @@ namespace gdjs {
sendProfilerStopped(): void {
if (!this._ws) {
console.warn('No connection to debugger opened');
logger.warn('No connection to debugger opened');
return;
}
this._ws.send(
@@ -333,7 +425,7 @@ namespace gdjs {
stats: ProfilerStats
): void {
if (!this._ws) {
console.warn(
logger.warn(
'No connection to debugger opened to send profiler measures'
);
return;

View File

@@ -1,427 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="92" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="com.example.gamename" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="AnchorBehavior" />
<extension name="TopDownMovementBehavior" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop C++ platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="brickWall.png" kind="image" name="brickWall.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="Grass.png" kind="image" name="Grass.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="coinGold.png" kind="image" name="coinGold.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="cactus.png" kind="image" name="cactus.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="p1_stand.png" kind="image" name="p1_stand.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="TopLeft" width="0.000000" x="27.000000" y="25.999954" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="TopLeft" width="0.000000" x="28.999939" y="117.999908" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="TopLeft" width="0.000000" x="120.999954" y="27.999924" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="BottomRight" width="0.000000" x="656.000000" y="451.999908" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Proportional" width="0.000000" x="335.999969" y="229.999969" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="TopRight" width="0.000000" x="579.999939" y="139.999985" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="TopRight" width="0.000000" x="710.000000" y="35.999985" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="TopRight" width="0.000000" x="666.000000" y="67.999985" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="TopRight" width="0.000000" x="623.999939" y="103.999985" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="3.000031" y="712.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="327.000031" y="111.999985" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="117.000031" y="307.999939" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="319.000031" y="459.999969" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="695.000000" y="217.999939" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="929.000000" y="548.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="970.999939" y="-32.000031" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="366.999969" y="-196.000031" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="-208.999939" y="43.999969" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="-228.999939" y="536.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="432.999969" y="690.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Background" width="0.000000" x="832.999939" y="-144.000031" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Center" width="0.000000" x="374.999939" y="282.000000" zOrder="6">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="TopLeft" type="Sprite">
<variables />
<behaviors>
<behavior bottomEdgeAnchor="0" leftEdgeAnchor="1" name="Anchor" relativeToOriginalWindowSize="true" rightEdgeAnchor="0" topEdgeAnchor="1" type="AnchorBehavior::AnchorBehavior" />
</behaviors>
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="brickWall.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="35.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="70.000000" />
<vertice x="0.000000" y="70.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="BottomRight" type="Sprite">
<variables />
<behaviors>
<behavior bottomEdgeAnchor="0" leftEdgeAnchor="2" name="Anchor" relativeToOriginalWindowSize="true" rightEdgeAnchor="0" topEdgeAnchor="2" type="AnchorBehavior::AnchorBehavior" />
</behaviors>
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="brickWall.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="35.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="70.000000" />
<vertice x="0.000000" y="70.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Proportional" type="Sprite">
<variables />
<behaviors>
<behavior bottomEdgeAnchor="3" leftEdgeAnchor="3" name="Anchor" relativeToOriginalWindowSize="true" rightEdgeAnchor="3" topEdgeAnchor="3" type="AnchorBehavior::AnchorBehavior" />
</behaviors>
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Grass.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="35.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="70.000000" />
<vertice x="0.000000" y="70.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="TopRight" type="Sprite">
<variables />
<behaviors>
<behavior bottomEdgeAnchor="0" leftEdgeAnchor="2" name="Anchor" relativeToOriginalWindowSize="true" rightEdgeAnchor="0" topEdgeAnchor="1" type="AnchorBehavior::AnchorBehavior" />
</behaviors>
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="coinGold.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="18.000000" y="18.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="36.000000" y="0.000000" />
<vertice x="36.000000" y="36.000000" />
<vertice x="0.000000" y="36.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Background" type="Sprite">
<variables />
<behaviors />
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="cactus.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="35.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="70.000000" />
<vertice x="0.000000" y="70.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Center" type="Sprite">
<variables />
<behaviors>
<behavior acceleration="400.000000" allowDiagonals="true" angleOffset="0.000000" angularMaxSpeed="180.000000" deceleration="800.000000" ignoreDefaultControls="false" maxSpeed="200.000000" name="TopDownMovement" rotateObject="true" type="TopDownMovementBehavior::TopDownMovementBehavior" />
</behaviors>
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="p1_stand.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="36.000000" y="46.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="72.000000" y="0.000000" />
<vertice x="72.000000" y="92.000000" />
<vertice x="0.000000" y="92.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>Space</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="Egal" />
<parameters>
<parameter>TimeFromStart()</parameter>
<parameter>&gt;</parameter>
<parameter>0.5</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="SetWindowSize" />
<parameters>
<parameter></parameter>
<parameter>SceneWindowWidth() + 40</parameter>
<parameter>SceneWindowHeight() + 40</parameter>
<parameter>yes</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="Scene" />
<parameters>
<parameter></parameter>
<parameter>&quot;New scene&quot;</parameter>
<parameter>true</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="CentreCamera" />
<parameters>
<parameter></parameter>
<parameter>Center</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
</layers>
<behaviorsSharedData>
<behaviorSharedData name="Anchor" type="AnchorBehavior::AnchorBehavior" />
<behaviorSharedData name="TopDownMovement" type="TopDownMovementBehavior::TopDownMovementBehavior" />
</behaviorsSharedData>
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,320 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project>
<GDVersion Major="3" Minor="0" Build="11297" Revision="57008" />
<Info winExecutableFilename="" winExecutableIconFile="" linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false">
<Nom value="Projet" />
<Auteur value="" />
<Extensions>
<Extension name="BuiltinObject" />
<Extension name="BuiltinAudio" />
<Extension name="BuiltinVariables" />
<Extension name="BuiltinTime" />
<Extension name="BuiltinMouse" />
<Extension name="BuiltinKeyboard" />
<Extension name="BuiltinJoystick" />
<Extension name="BuiltinCamera" />
<Extension name="BuiltinWindow" />
<Extension name="BuiltinFile" />
<Extension name="BuiltinNetwork" />
<Extension name="BuiltinScene" />
<Extension name="BuiltinAdvanced" />
<Extension name="Sprite" />
<Extension name="BuiltinCommonInstructions" />
<Extension name="BuiltinCommonConversions" />
<Extension name="BuiltinStringInstructions" />
<Extension name="BuiltinMathematicalTools" />
<Extension name="BuiltinExternalLayouts" />
</Extensions>
<Platforms current="GDevelop JS platform">
<Platform name="GDevelop JS platform" />
</Platforms>
<WindowW value="800" />
<WindowH value="600" />
<Portable />
<LatestCompilationDirectory value="" />
<FPSmax value="60" />
<FPSmin value="10" />
<verticalSync value="false" />
</Info>
<Resources>
<Resources>
<Resource kind="image" name="2DWoodBox.jpg" alwaysLoaded="false" smoothed="true" userAdded="false" file="2DWoodBox.jpg" />
</Resources>
<ResourceFolders />
</Resources>
<Objects />
<ObjectGroups />
<Variables>
<Variable Name="test" Value="0" />
</Variables>
<Scenes>
<Scene nom="Nouvelle sc<73>ne" r="209.000000" v="209.000000" b="209.000000" titre="" oglFOV="90.000000" oglZNear="1.000000" oglZFar="500.000000" standardSortMethod="true" stopSoundsOnStartup="true" disableInputWhenNotFocused="true">
<UISettings gridWidth="32.000000" grid="false" snap="true" gridHeight="32.000000" gridR="158.000000" gridG="180.000000" gridB="255.000000" zoomFactor="1.000000" windowMask="false" associatedLayout="" />
<GroupesObjets />
<Objets>
<Objet nom="NouvelObjet" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="2DWoodBox.jpg">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="32.000000" Y="32.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
</Objets>
<Layers>
<Layer Name="" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
</Layers>
<Variables>
<Variable Name="NouvelleVariable" Value="0" />
</Variables>
<BehaviorsSharedDatas />
<Positions>
<Objet nom="NouvelObjet" x="466.000000" y="188.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="465.000000" y="73.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="468.000000" y="394.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="191.000000" y="385.500000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="186.000015" y="188.500000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="178.000000" y="67.500008" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
</Positions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Comment" />
<Couleur r="255.000000" v="230.000000" b="109.000000" textR="0.000000" textG="0.000000" textB="0.000000" />
<Com1 value="There should be 6 boxes. Boxes on the right should be visible, boxes on the first row also and 2 boxes on the left column should be semi transparent.&#x0A;Each row should be turning at a different speed.&#x0A;&#x0A;When global variable test reach 100, rotation speed should change( but remains different for each row ) and&#x0A;some boxes are created at position 100;100" />
<Com2 value="" />
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="CollisionNP" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="NouvelObjet" />
<Parametre value="" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="Delete" />
<Parametre value="NouvelObjet" />
<Parametre value="" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions />
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="ModVarGlobal" />
<Parametre value="" />
<Parametre value="test" />
<Parametre value="+" />
<Parametre value="4" />
</Action>
</Actions>
</Event>
</Events>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions />
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Link" />
<Type value="Link" />
<Limites includeAll="true" start="2147483647.000000" end="2147483647.000000" />
<Scene value="Evenements externes" />
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="VarObjet" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="Coucou" />
<Parametre value="&gt;=" />
<Parametre value="2" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NouvelObjet" />
<Parametre value="+" />
<Parametre value="4" />
</Action>
<Action>
<Type value="Create" />
<Parametre value="" />
<Parametre value="NouvelObjet" />
<Parametre value="100" />
<Parametre value="100" />
<Parametre value="" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="VarGlobal" Contraire="false" />
<Parametre value="" />
<Parametre value="test" />
<Parametre value="&gt;" />
<Parametre value="100" />
</Condition>
</Conditions>
<Actions />
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="ModVarObjet" />
<Parametre value="NouvelObjet" />
<Parametre value="Coucou" />
<Parametre value="+" />
<Parametre value="2" />
</Action>
</Actions>
</Event>
</Events>
</Event>
</Events>
</Scene>
</Scenes>
<ExternalEvents>
<ExternalEvents Name="Evenements externes" AssociatedScene="Nouvelle sc<73>ne" LastChangeTimeStamp="0">
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="PosY" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="&gt;" />
<Parametre value="130" />
</Condition>
</Conditions>
<Actions />
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="PosY" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="&gt;" />
<Parametre value="300" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NouvelObjet" />
<Parametre value="-" />
<Parametre value="10" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="PosY" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="&lt;" />
<Parametre value="300" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NouvelObjet" />
<Parametre value="+" />
<Parametre value="10" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="PosX" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="&lt;" />
<Parametre value="400" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="Opacity" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value="150" />
</Action>
</Actions>
</Event>
</Events>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NouvelObjet" />
<Parametre value="+" />
<Parametre value="2" />
</Action>
</Actions>
</Event>
</Events>
</ExternalEvents>
</ExternalEvents>
<ExternalLayouts />
<ExternalSourceFiles />
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,696 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project>
<GDVersion Major="3" Minor="2" Build="67" Revision="0" />
<Info winExecutableFilename="" winExecutableIconFile="" linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false">
<Nom value="Basic breakout" />
<Auteur value="" />
<Extensions>
<Extension name="BuiltinObject" />
<Extension name="BuiltinAudio" />
<Extension name="BuiltinVariables" />
<Extension name="BuiltinTime" />
<Extension name="BuiltinMouse" />
<Extension name="BuiltinKeyboard" />
<Extension name="BuiltinJoystick" />
<Extension name="BuiltinCamera" />
<Extension name="BuiltinWindow" />
<Extension name="BuiltinFile" />
<Extension name="BuiltinNetwork" />
<Extension name="BuiltinScene" />
<Extension name="BuiltinAdvanced" />
<Extension name="Sprite" />
<Extension name="BuiltinCommonInstructions" />
<Extension name="BuiltinCommonConversions" />
<Extension name="BuiltinStringInstructions" />
<Extension name="BuiltinMathematicalTools" />
<Extension name="BuiltinExternalLayouts" />
<Extension name="CommonDialogs" />
<Extension name="TextObject" />
</Extensions>
<Platforms current="GDevelop JS platform">
<Platform name="GDevelop JS platform" />
<Platform name="GDevelop C++ platform" />
</Platforms>
<WindowW value="800" />
<WindowH value="600" />
<Portable />
<LatestCompilationDirectory value="" />
<FPSmax value="60" />
<FPSmin value="10" />
<verticalSync value="false" />
</Info>
<Resources>
<Resources>
<Resource kind="image" name="terrain.png" alwaysLoaded="false" smoothed="true" userAdded="true" file="terrain.png" />
<Resource kind="image" name="barre.png" alwaysLoaded="false" smoothed="true" userAdded="true" file="barre.png" />
<Resource kind="image" name="balle.png" alwaysLoaded="false" smoothed="true" userAdded="true" file="balle.png" />
<Resource kind="image" name="brick.png" alwaysLoaded="false" smoothed="true" userAdded="true" file="brick.png" />
</Resources>
<ResourceFolders />
</Resources>
<Objects />
<ObjectGroups />
<Variables />
<Scenes firstScene="">
<Scene nom="Nouvelle sc<73>ne" mangledName="Nouvelle_32sc__4524ne" r="192.000000" v="192.000000" b="192.000000" titre="" oglFOV="90.000000" oglZNear="1.000000" oglZFar="500.000000" standardSortMethod="true" stopSoundsOnStartup="true" disableInputWhenNotFocused="true">
<UISettings gridWidth="32.000000" grid="false" snap="true" gridHeight="32.000000" gridR="158.000000" gridG="180.000000" gridB="255.000000" zoomFactor="0.698925" windowMask="true" associatedLayout="" />
<GroupesObjets />
<Objets>
<Objet nom="terrain" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="true">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="terrain.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="399.000000" Y="300.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="barre" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="true">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="barre.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="27.000000" Y="5.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="balle" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="true">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="balle.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="3.000000" Y="3.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="brick" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="brick.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="14.000000" Y="7.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="NouvelObjet" type="TextObject::Text" smoothed="true" bold="false" italic="false" underlined="false">
<Variables />
<String value="Text" />
<Font value="" />
<CharacterSize value="20" />
<Color r="255" g="255" b="255" />
</Objet>
<Objet nom="balle2" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="balle.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="3.000000" Y="3.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
</Objets>
<Layers>
<Layer Name="" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
<Layer Name="Nouveau calque 1" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
<Layer Name="Nouveau calque" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
<Layer Name="Static" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
</Layers>
<Variables>
<Variable Name="Visible" Value="0" />
</Variables>
<BehaviorsSharedDatas />
<Positions>
<Objet nom="brick" x="375.753815" y="222.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="346.753815" y="236.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="404.753815" y="236.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="433.753815" y="250.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="462.753815" y="264.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="317.753815" y="250.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="288.753815" y="264.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="288.753815" y="278.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="288.753815" y="292.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="288.753815" y="306.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="462.753815" y="278.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="462.753815" y="292.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="462.753815" y="306.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="317.753815" y="320.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="346.753815" y="320.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="375.753815" y="320.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="404.753815" y="320.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="433.753815" y="320.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="375.753815" y="250.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="375.753815" y="264.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="375.753815" y="278.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="375.753815" y="292.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="375.753815" y="306.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="317.753815" y="292.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="346.753815" y="278.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="404.753815" y="278.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="433.753815" y="292.476898" plan="0" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="barre" x="92.499969" y="464.000000" plan="1" layer="Nouveau calque" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="barre" x="214.500000" y="468.000000" plan="1" layer="Nouveau calque" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="barre" x="342.500000" y="468.000000" plan="1" layer="Nouveau calque" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="barre" x="481.500000" y="470.000000" plan="1" layer="Nouveau calque" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="barre" x="594.500000" y="463.000000" plan="1" layer="Nouveau calque" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="balle" x="389.684570" y="287.892303" plan="1" layer="Nouveau calque 1" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="863.515381" y="15.430725" plan="1" layer="Nouveau calque 1" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="834.099976" y="710.215332" plan="1" layer="Nouveau calque 1" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="-33.500008" y="19.999998" plan="1" layer="Nouveau calque 1" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="brick" x="-24.915405" y="708.784607" plan="1" layer="Nouveau calque 1" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="162.492432" y="89.677048" plan="1" layer="Static" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="balle2" x="707.615356" y="196.269272" plan="1" layer="Static" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
</Positions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Comment" />
<Couleur r="255.000000" v="230.000000" b="109.000000" textR="0.000000" textG="0.000000" textB="0.000000" />
<Com1 value='Bricks should be rotated, and barre should be flashing.&#x0A;A layer is centered on the &quot;balle&quot; Object.&#x0A;balle2 is following the mouse' />
<Com2 value="" />
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="SetFullScreen" />
<Parametre value="" />
<Parametre value="oui" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="TextObject::String" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value='&quot;Mouse X:&quot;+ToString(MouseX(&quot;Static&quot;,0))+NewLine()+&quot;/Y:&quot;+ToString(MouseY(&quot;Static&quot;,0))' />
</Action>
<Action>
<Type value="MettreXY" />
<Parametre value="balle2" />
<Parametre value="=" />
<Parametre value='MouseX(&quot;Static&quot;)' />
<Parametre value="=" />
<Parametre value='MouseY(&quot;Static&quot;)' />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="RotateCamera" />
<Parametre value="" />
<Parametre value="+" />
<Parametre value="1" />
<Parametre value="" />
<Parametre value="" />
</Action>
<Action>
<Type value="ChangeDirection" />
<Parametre value="brick" />
<Parametre value="+" />
<Parametre value="1" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="ZoomCamera" />
<Parametre value="" />
<Parametre value="0.5" />
<Parametre value="" />
<Parametre value="" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="ModVarScene" />
<Parametre value="Visible" />
<Parametre value="=" />
<Parametre value="0" />
</Action>
</Actions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="LayerVisible" Contraire="false" />
<Parametre value="" />
<Parametre value='&quot;Nouveau calque&quot;' />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ModVarScene" />
<Parametre value="Visible" />
<Parametre value="=" />
<Parametre value="1" />
</Action>
</Actions>
</Event>
</Events>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="VarScene" Contraire="false" />
<Parametre value="Visible" />
<Parametre value="=" />
<Parametre value="0" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ShowLayer" />
<Parametre value="" />
<Parametre value='&quot;Nouveau calque&quot;' />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="VarScene" Contraire="false" />
<Parametre value="Visible" />
<Parametre value="=" />
<Parametre value="1" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="HideLayer" />
<Parametre value="" />
<Parametre value='&quot;Nouveau calque&quot;' />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="KeyPressed" Contraire="false" />
<Parametre value="" />
<Parametre value="Down" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="AddForceXY" />
<Parametre value="balle" />
<Parametre value="0" />
<Parametre value="150" />
<Parametre value="0" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="KeyPressed" Contraire="false" />
<Parametre value="" />
<Parametre value="Right" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="AddForceXY" />
<Parametre value="balle" />
<Parametre value="150" />
<Parametre value="0" />
<Parametre value="0" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="KeyPressed" Contraire="false" />
<Parametre value="" />
<Parametre value="Up" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="AddForceXY" />
<Parametre value="balle" />
<Parametre value="0" />
<Parametre value="-150" />
<Parametre value="0" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="KeyPressed" Contraire="false" />
<Parametre value="" />
<Parametre value="Left" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="AddForceXY" />
<Parametre value="balle" />
<Parametre value="-150" />
<Parametre value="0" />
<Parametre value="0" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="FixCamera" />
<Parametre value="" />
<Parametre value="balle" />
<Parametre value="-500" />
<Parametre value="-500" />
<Parametre value="1500" />
<Parametre value="1500" />
<Parametre value="" />
<Parametre value='&quot;Nouveau calque 1&quot;' />
<Parametre value="" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="KeyPressed" Contraire="false" />
<Parametre value="" />
<Parametre value="Space" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="RotateCamera" />
<Parametre value="" />
<Parametre value="+" />
<Parametre value="1" />
<Parametre value='&quot;Nouveau calque 1&quot;' />
<Parametre value="" />
</Action>
</Actions>
</Event>
</Events>
</Scene>
</Scenes>
<ExternalEvents />
<ExternalLayouts />
<ExternalSourceFiles />
</Project>

View File

@@ -1,241 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="91" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Projet</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop C++ platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="2DWoodBox.jpg" kind="image" name="2DWoodBox.jpg" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="spship.png" kind="image" name="spship.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="Nouvelle_32sc_232ne" name="Nouvelle scène" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="243.000000" layer="" locked="false" name="NouvelObjet1" width="278.000000" x="108.500000" y="59.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NouvelObjet" width="0.000000" x="400.500000" y="253.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NouvelObjet" width="0.000000" x="195.500000" y="95.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NouvelObjet" width="0.000000" x="563.500000" y="370.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="NouvelObjet" type="Sprite">
<variables>
<variable name="NewVariable" value="1" />
<variable name="NewVariable2" value="2" />
</variables>
<behaviors />
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="2DWoodBox.jpg">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="32.000000" y="32.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="64.000000" y="0.000000" />
<vertice x="64.000000" y="64.000000" />
<vertice x="0.000000" y="64.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="NouvelObjet1" type="Sprite">
<variables />
<behaviors />
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="spship.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="41.500000" y="41.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="83.000000" y="0.000000" />
<vertice x="83.000000" y="83.000000" />
<vertice x="0.000000" y="83.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="DepartScene" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Repeat</type>
<repeatExpression>300</repeatExpression>
<conditions />
<actions>
<action>
<type inverted="false" value="Create" />
<parameters>
<parameter></parameter>
<parameter>NouvelObjet</parameter>
<parameter>Random(400)</parameter>
<parameter>Random(300)</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="Create" />
<parameters>
<parameter></parameter>
<parameter>NouvelObjet1</parameter>
<parameter>0</parameter>
<parameter>0</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="MettreXY" />
<parameters>
<parameter>NouvelObjet1</parameter>
<parameter>=</parameter>
<parameter>MouseX()</parameter>
<parameter>=</parameter>
<parameter>MouseY()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="CollisionNP" />
<parameters>
<parameter>NouvelObjet1</parameter>
<parameter>NouvelObjet</parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ChangeDirection" />
<parameters>
<parameter>NouvelObjet</parameter>
<parameter>+</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="89" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Projet</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="DraggableBehavior" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop C++ platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="rusty_ship.png" kind="image" name="rusty_ship.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="Nouvelle_32sc_232ne" name="Nouvelle scène" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NouvelObjet" width="0.000000" x="177.000000" y="375.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NouvelObjet" width="0.000000" x="178.000000" y="146.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NouvelObjet" width="0.000000" x="421.000000" y="245.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="NouvelObjet" type="Sprite">
<variables />
<behaviors>
<behavior name="Draggable" type="DraggableBehavior::Draggable" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="rusty_ship.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="50.500000" y="48.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="101.000000" y="0.000000" />
<vertice x="101.000000" y="96.000000" />
<vertice x="0.000000" y="96.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events />
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,176 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project>
<GDVersion Major="3" Minor="0" Build="11297" Revision="57008" />
<Info winExecutableFilename="" winExecutableIconFile="" linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false">
<Nom value="Projet" />
<Auteur value="" />
<Extensions>
<Extension name="BuiltinObject" />
<Extension name="BuiltinAudio" />
<Extension name="BuiltinVariables" />
<Extension name="BuiltinTime" />
<Extension name="BuiltinMouse" />
<Extension name="BuiltinKeyboard" />
<Extension name="BuiltinJoystick" />
<Extension name="BuiltinCamera" />
<Extension name="BuiltinWindow" />
<Extension name="BuiltinFile" />
<Extension name="BuiltinNetwork" />
<Extension name="BuiltinScene" />
<Extension name="BuiltinAdvanced" />
<Extension name="Sprite" />
<Extension name="BuiltinCommonInstructions" />
<Extension name="BuiltinCommonConversions" />
<Extension name="BuiltinStringInstructions" />
<Extension name="BuiltinMathematicalTools" />
<Extension name="BuiltinExternalLayouts" />
</Extensions>
<Platforms current="GDevelop JS platform">
<Platform name="GDevelop JS platform" />
<Platform name="GDevelop C++ platform" />
</Platforms>
<WindowW value="800" />
<WindowH value="600" />
<Portable />
<LatestCompilationDirectory value="" />
<FPSmax value="60" />
<FPSmin value="10" />
<verticalSync value="false" />
</Info>
<Resources>
<Resources>
<Resource kind="image" name="asteroid7.png" alwaysLoaded="false" smoothed="true" userAdded="false" file="asteroid7.png" />
<Resource kind="image" name="LifeBonus.png" alwaysLoaded="false" smoothed="true" userAdded="false" file="LifeBonus.png" />
</Resources>
<ResourceFolders />
</Resources>
<Objects />
<ObjectGroups />
<Variables />
<Scenes firstScene="">
<Scene nom="Nouvelle sc<73>ne" mangledName="Nouvelle_32sc__4524ne" r="209.000000" v="209.000000" b="209.000000" titre="" oglFOV="90.000000" oglZNear="1.000000" oglZFar="500.000000" standardSortMethod="true" stopSoundsOnStartup="true" disableInputWhenNotFocused="true">
<UISettings gridWidth="32.000000" grid="false" snap="true" gridHeight="32.000000" gridR="158.000000" gridG="180.000000" gridB="255.000000" zoomFactor="1.000000" windowMask="false" associatedLayout="" />
<GroupesObjets />
<Objets>
<Objet nom="NouvelObjet" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="asteroid7.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="28.000000" Y="28.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="NouvelObjet1" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="LifeBonus.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="25.000000" Y="25.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
</Objets>
<Layers>
<Layer Name="" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
</Layers>
<Variables />
<BehaviorsSharedDatas />
<Positions>
<Objet nom="NouvelObjet" x="347.000000" y="234.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="202.000000" y="354.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="562.000000" y="152.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet1" x="227.000000" y="157.000000" plan="5" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet1" x="398.000000" y="79.000008" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet1" x="409.000000" y="323.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
</Positions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::ForEach" />
<Object value="NouvelObjet" />
<Conditions />
<Actions />
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::ForEach" />
<Object value="NouvelObjet" />
<Conditions />
<Actions>
<Action>
<Type value="MettreXY" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value="MouseX()" />
<Parametre value="=" />
<Parametre value="MouseY()" />
</Action>
</Actions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::ForEach" />
<Object value="NouvelObjet1" />
<Conditions />
<Actions>
<Action>
<Type value="MettreXY" />
<Parametre value="NouvelObjet1" />
<Parametre value="=" />
<Parametre value="MouseX()" />
<Parametre value="=" />
<Parametre value="MouseY()" />
</Action>
</Actions>
</Event>
</Events>
</Event>
</Events>
</Event>
</Events>
</Scene>
</Scenes>
<ExternalEvents />
<ExternalLayouts />
<ExternalSourceFiles />
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,224 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="92" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="com.example.gamename" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="TextObject" />
<extension name="Inventory" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources />
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Item1Count" width="0.000000" x="151.000031" y="67.999939" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Item1Plus" width="0.000000" x="249.000031" y="51.999969" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Item1Minus" width="0.000000" x="247.000031" y="73.999985" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object bold="false" italic="false" name="Item1Count" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>Text</string>
<font></font>
<characterSize>20</characterSize>
<color b="255" g="255" r="255" />
</object>
<object bold="false" italic="false" name="Item1Plus" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>+</string>
<font></font>
<characterSize>20</characterSize>
<color b="255" g="255" r="255" />
</object>
<object bold="false" italic="false" name="Item1Minus" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>-</string>
<font></font>
<characterSize>20</characterSize>
<color b="255" g="255" r="255" />
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="DepartScene" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Inventory::SetMaximum" />
<parameters>
<parameter></parameter>
<parameter>&quot;Inventory1&quot;</parameter>
<parameter>&quot;Item1&quot;</parameter>
<parameter>9</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="MouseButtonReleased" />
<parameters>
<parameter></parameter>
<parameter>Left</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisSurObjet" />
<parameters>
<parameter>Item1Minus</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Inventory::Remove" />
<parameters>
<parameter></parameter>
<parameter>&quot;Inventory1&quot;</parameter>
<parameter>&quot;Item1&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisSurObjet" />
<parameters>
<parameter>Item1Plus</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Inventory::Add" />
<parameters>
<parameter></parameter>
<parameter>&quot;Inventory1&quot;</parameter>
<parameter>&quot;Item1&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>Item1Count</parameter>
<parameter>=</parameter>
<parameter>&quot;Item1: &quot; + ToString(Inventory::Count(&quot;Inventory1&quot;, &quot;Item1&quot;))</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,240 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project>
<GDVersion Major="3" Minor="0" Build="11298" Revision="57009" />
<Info winExecutableFilename="" winExecutableIconFile="" linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false">
<Nom value="Project" />
<Auteur value="" />
<Extensions>
<Extension name="BuiltinObject" />
<Extension name="BuiltinAudio" />
<Extension name="BuiltinVariables" />
<Extension name="BuiltinTime" />
<Extension name="BuiltinMouse" />
<Extension name="BuiltinKeyboard" />
<Extension name="BuiltinJoystick" />
<Extension name="BuiltinCamera" />
<Extension name="BuiltinWindow" />
<Extension name="BuiltinFile" />
<Extension name="BuiltinNetwork" />
<Extension name="BuiltinScene" />
<Extension name="BuiltinAdvanced" />
<Extension name="Sprite" />
<Extension name="BuiltinCommonInstructions" />
<Extension name="BuiltinCommonConversions" />
<Extension name="BuiltinStringInstructions" />
<Extension name="BuiltinMathematicalTools" />
<Extension name="BuiltinExternalLayouts" />
</Extensions>
<Platforms current="GDevelop JS platform">
<Platform name="GDevelop JS platform" />
<Platform name="GDevelop C++ platform" />
</Platforms>
<WindowW value="800" />
<WindowH value="600" />
<Portable />
<LatestCompilationDirectory value="" />
<FPSmax value="60" />
<FPSmin value="10" />
<verticalSync value="false" />
</Info>
<Resources>
<Resources>
<Resource kind="image" name="tank1fr1.png" alwaysLoaded="false" smoothed="true" userAdded="true" file="tank1fr1.png" />
<Resource kind="image" name="tank2fr2.png" alwaysLoaded="false" smoothed="true" userAdded="true" file="tank2fr2.png" />
<Resource kind="image" name="asteroid7.png" alwaysLoaded="false" smoothed="true" userAdded="false" file="asteroid7.png" />
</Resources>
<ResourceFolders />
</Resources>
<Objects />
<ObjectGroups />
<Variables />
<Scenes firstScene="">
<Scene nom="New scene" mangledName="New_32scene" r="209.000000" v="209.000000" b="209.000000" titre="" oglFOV="90.000000" oglZNear="1.000000" oglZFar="500.000000" standardSortMethod="true" stopSoundsOnStartup="true" disableInputWhenNotFocused="true">
<UISettings gridWidth="32.000000" grid="false" snap="true" gridHeight="32.000000" gridR="158.000000" gridG="180.000000" gridB="255.000000" zoomFactor="1.000000" windowMask="false" associatedLayout="" />
<GroupesObjets />
<Objets>
<Objet nom="NewObject" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="tank1fr1.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="35.000000" Y="31.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="NewObject2" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="tank2fr2.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="35.000000" Y="31.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="NewObject3" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="asteroid7.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="28.000000" Y="28.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
</Objets>
<Layers>
<Layer Name="" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
</Layers>
<Variables />
<BehaviorsSharedDatas />
<Positions>
<Objet nom="NewObject" x="184.500000" y="299.500000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject2" x="369.500000" y="466.500000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject2" x="345.500000" y="151.500000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject2" x="444.500000" y="239.499985" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject2" x="504.500000" y="392.500000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject3" x="118.500000" y="161.500015" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject3" x="650.500000" y="107.500046" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject3" x="143.500000" y="162.500015" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject3" x="585.500000" y="223.500046" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NewObject3" x="730.500000" y="216.500031" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
</Positions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Comment" />
<Couleur r="255.000000" v="230.000000" b="109.000000" textR="0.000000" textG="0.000000" textB="0.000000" />
<Com1 value="Rocks not colliding with any other rock should turn.&#x0A;The newObject under the cursor and the other tanks should turn as long as the object under the cursor does not collide with a tank." />
<Com2 value="" />
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="CollisionNP" Contraire="true" />
<Parametre value="NewObject" />
<Parametre value="NewObject2" />
<Parametre value="" />
<Parametre value="" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NewObject" />
<Parametre value="+" />
<Parametre value="1" />
</Action>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NewObject2" />
<Parametre value="+" />
<Parametre value="1" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="MettreXY" />
<Parametre value="NewObject" />
<Parametre value="=" />
<Parametre value='MouseX(&quot;&quot;,0)' />
<Parametre value="=" />
<Parametre value='MouseY(&quot;&quot;,0)' />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="CollisionNP" Contraire="true" />
<Parametre value="NewObject3" />
<Parametre value="NewObject3" />
<Parametre value="" />
<Parametre value="" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NewObject3" />
<Parametre value="+" />
<Parametre value="1" />
</Action>
</Actions>
</Event>
</Events>
</Scene>
</Scenes>
<ExternalEvents />
<ExternalLayouts />
<ExternalSourceFiles />
</Project>

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project firstLayout="">
<gdVersion build="80" major="3" minor="6" revision="0" />
<properties linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources />
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings associatedLayout="" grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances />
<objects />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyReleased" />
<parameters>
<parameter></parameter>
<parameter>a</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="SceneBackground" />
<parameters>
<parameter></parameter>
<parameter>&quot;102;204;255&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>a</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="SceneBackground" />
<parameters>
<parameter></parameter>
<parameter>&quot;102;255;204&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,194 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="94" major="4" minor="0" revision="15" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="com.example.gamename" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="brickWall.png" kind="image" name="brickWall.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="New layer 1" locked="false" name="NewObject" width="0.000000" x="86.999985" y="67.999969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="New layer" locked="false" name="NewObject" width="0.000000" x="84.999969" y="357.999939" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="82.999939" y="219.999969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="NewObject" type="Sprite">
<variables />
<behaviors />
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="brickWall.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="35.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="70.000000" />
<vertice x="0.000000" y="70.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="DepartScene" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ChangeTimeScale" />
<parameters>
<parameter></parameter>
<parameter>0.3</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="AddForceXY" />
<parameters>
<parameter>NewObject</parameter>
<parameter>300</parameter>
<parameter>0</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ChangeLayerTimeScale" />
<parameters>
<parameter></parameter>
<parameter>&quot;New layer 1&quot;</parameter>
<parameter>2</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ChangeLayerTimeScale" />
<parameters>
<parameter></parameter>
<parameter>&quot;New layer&quot;</parameter>
<parameter>0.5</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>180</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="New layer" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
<layer name="New layer 1" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,518 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project firstLayout="">
<gdVersion build="84" major="3" minor="6" revision="0" />
<properties linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="LinkedObjects" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="Pea-Happy.png" kind="image" name="Pea-Happy.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="Pea-Hurt.png" kind="image" name="Pea-Hurt.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings associatedLayout="" grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="403.999847" y="357.999969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="CopyOfNewObject" width="0.000000" x="399.999908" y="336.000000" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="CopyOfNewObject" width="0.000000" x="593.999939" y="168.000000" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="581.999939" y="148.000015" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="CopyOfNewObject" width="0.000000" x="38.000000" y="280.000000" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="26.000000" y="260.000031" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="CopyOfNewObject" width="0.000000" x="351.999969" y="176.000000" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="339.999969" y="156.000031" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="CopyOfNewObject" width="0.000000" x="423.999969" y="361.999969" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="CopyOfNewObject" width="0.000000" x="384.000031" y="376.000031" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="NewObject" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Pea-Happy.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="18.500000" y="18.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="37.000000" y="0.000000" />
<vertice x="37.000000" y="37.000000" />
<vertice x="0.000000" y="37.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Pea-Hurt.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="19.000000" y="21.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="38.000000" y="0.000000" />
<vertice x="38.000000" y="43.000000" />
<vertice x="0.000000" y="43.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="CopyOfNewObject" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Pea-Happy.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="18.500000" y="18.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="37.000000" y="0.000000" />
<vertice x="37.000000" y="37.000000" />
<vertice x="0.000000" y="37.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Pea-Hurt.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="19.000000" y="21.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="38.000000" y="0.000000" />
<vertice x="38.000000" y="43.000000" />
<vertice x="0.000000" y="43.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="DepartScene" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ChangeColor" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&quot;102;204;255&quot;</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ChangePlan" />
<parameters>
<parameter>NewObject</parameter>
<parameter>=</parameter>
<parameter>2</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="SceneBackground" />
<parameters>
<parameter></parameter>
<parameter>ToString(Random(255))+&quot;;255;&quot;+ToString(Random(255))</parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::ForEach</type>
<object>NewObject</object>
<conditions>
<condition>
<type inverted="false" value="CollisionNP" />
<parameters>
<parameter>CopyOfNewObject</parameter>
<parameter>NewObject</parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::ForEach</type>
<object>CopyOfNewObject</object>
<conditions />
<actions>
<action>
<type inverted="false" value="LinkedObjects::LinkObjects" />
<parameters>
<parameter></parameter>
<parameter>NewObject</parameter>
<parameter>CopyOfNewObject</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisSurObjet" />
<parameters>
<parameter>NewObject</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="LinkedObjects::PickObjectsLinkedTo" />
<parameters>
<parameter></parameter>
<parameter>CopyOfNewObject</parameter>
<parameter>NewObject</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>150</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>CopyOfNewObject</parameter>
<parameter>150</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisSurObjet" />
<parameters>
<parameter>NewObject</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="SourisBouton" />
<parameters>
<parameter></parameter>
<parameter>Left</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="LinkedObjects::RemoveAllLinksOf" />
<parameters>
<parameter></parameter>
<parameter>NewObject</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisSurObjet" />
<parameters>
<parameter>CopyOfNewObject</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="SourisBouton" />
<parameters>
<parameter></parameter>
<parameter>Left</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="LinkedObjects::PickObjectsLinkedTo" />
<parameters>
<parameter></parameter>
<parameter>NewObject</parameter>
<parameter>CopyOfNewObject</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="LinkedObjects::RemoveLinkBetween" />
<parameters>
<parameter></parameter>
<parameter>NewObject</parameter>
<parameter>CopyOfNewObject</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyReleased" />
<parameters>
<parameter></parameter>
<parameter>p</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="PushScene" />
<parameters>
<parameter></parameter>
<parameter>&quot;New scene&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyReleased" />
<parameters>
<parameter></parameter>
<parameter>o</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="PopScene" />
<parameters>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyReleased" />
<parameters>
<parameter></parameter>
<parameter>r</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Scene" />
<parameters>
<parameter></parameter>
<parameter>&quot;New scene&quot;</parameter>
<parameter>no</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyReleased" />
<parameters>
<parameter></parameter>
<parameter>c</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Scene" />
<parameters>
<parameter></parameter>
<parameter>&quot;New scene&quot;</parameter>
<parameter>yes</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,347 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project firstLayout="">
<gdVersion build="78" major="3" minor="6" revision="0" />
<properties linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Projet</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="Block-Place-Normal.png" kind="image" name="Block-Place-Normal.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="Block-Gel.png" kind="image" name="Block-Gel.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="Pointer-Standard.png" kind="image" name="Pointer-Standard.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="Nouvelle_32sc__4561__4588ne" name="Nouvelle scène" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings associatedLayout="" grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object1" width="0.000000" x="425.019012" y="105.883347" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object1" width="0.000000" x="286.500031" y="168.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object1" width="0.000000" x="449.774689" y="273.396820" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object1" width="0.000000" x="206.343781" y="307.229584" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object1" width="0.000000" x="628.840820" y="104.232971" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object2" width="0.000000" x="729.663208" y="171.683014" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object2" width="0.000000" x="374.006561" y="255.027176" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object2" width="0.000000" x="175.135880" y="99.066345" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Object2" width="0.000000" x="317.068481" y="188.186813" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="Object1" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Block-Place-Normal.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="36.000000" y="31.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="72.000000" y="0.000000" />
<vertice x="72.000000" y="62.000000" />
<vertice x="0.000000" y="62.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Object2" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Block-Gel.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.500000" y="30.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="71.000000" y="0.000000" />
<vertice x="71.000000" y="61.000000" />
<vertice x="0.000000" y="61.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Marker" type="Sprite">
<variables>
<variable name="TouchId" value="0" />
</variables>
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="Pointer-Standard.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="22.000000" y="22.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="44.000000" y="0.000000" />
<vertice x="44.000000" y="44.000000" />
<vertice x="0.000000" y="44.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisSurObjet" />
<parameters>
<parameter>Object1</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>Object1</parameter>
<parameter>180</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="true" value="SourisSurObjet" />
<parameters>
<parameter>Object2</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>Object2</parameter>
<parameter>180</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PopStartedTouch" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Create" />
<parameters>
<parameter></parameter>
<parameter>Marker</parameter>
<parameter>0</parameter>
<parameter>0</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarObjet" />
<parameters>
<parameter>Marker</parameter>
<parameter>TouchId</parameter>
<parameter>=</parameter>
<parameter>LastTouchId()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false" infiniteLoopWarning="true">
<type>BuiltinCommonInstructions::While</type>
<whileConditions>
<condition>
<type inverted="false" value="PopEndedTouch" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</whileConditions>
<conditions>
<condition>
<type inverted="false" value="VarObjet" />
<parameters>
<parameter>Marker</parameter>
<parameter>TouchId</parameter>
<parameter>=</parameter>
<parameter>LastEndedTouchId()</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Delete" />
<parameters>
<parameter>Marker</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::ForEach</type>
<object>Marker</object>
<conditions />
<actions>
<action>
<type inverted="false" value="MettreXY" />
<parameters>
<parameter>Marker</parameter>
<parameter>=</parameter>
<parameter>TouchX(Marker.Variable(TouchId))</parameter>
<parameter>=</parameter>
<parameter>TouchY(Marker.Variable(TouchId))</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,164 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project>
<GDVersion Major="3" Minor="0" Build="11297" Revision="57008" />
<Info winExecutableFilename="" winExecutableIconFile="" linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false">
<Nom value="Projet" />
<Auteur value="" />
<Extensions>
<Extension name="BuiltinObject" />
<Extension name="BuiltinAudio" />
<Extension name="BuiltinVariables" />
<Extension name="BuiltinTime" />
<Extension name="BuiltinMouse" />
<Extension name="BuiltinKeyboard" />
<Extension name="BuiltinJoystick" />
<Extension name="BuiltinCamera" />
<Extension name="BuiltinWindow" />
<Extension name="BuiltinFile" />
<Extension name="BuiltinNetwork" />
<Extension name="BuiltinScene" />
<Extension name="BuiltinAdvanced" />
<Extension name="Sprite" />
<Extension name="BuiltinCommonInstructions" />
<Extension name="BuiltinCommonConversions" />
<Extension name="BuiltinStringInstructions" />
<Extension name="BuiltinMathematicalTools" />
<Extension name="BuiltinExternalLayouts" />
</Extensions>
<Platforms current="GDevelop JS platform">
<Platform name="GDevelop JS platform" />
</Platforms>
<WindowW value="800" />
<WindowH value="600" />
<Portable />
<LatestCompilationDirectory value="" />
<FPSmax value="60" />
<FPSmin value="10" />
<verticalSync value="false" />
</Info>
<Resources>
<Resources>
<Resource kind="image" name="2DWoodBox.jpg" alwaysLoaded="false" smoothed="true" userAdded="false" file="2DWoodBox.jpg" />
<Resource kind="image" name="asteroid7.png" alwaysLoaded="false" smoothed="true" userAdded="false" file="asteroid7.png" />
</Resources>
<ResourceFolders />
</Resources>
<Objects />
<ObjectGroups />
<Variables />
<Scenes>
<Scene nom="Nouvelle sc<73>ne" r="209.000000" v="209.000000" b="209.000000" titre="" oglFOV="90.000000" oglZNear="1.000000" oglZFar="500.000000" standardSortMethod="true" stopSoundsOnStartup="true" disableInputWhenNotFocused="true">
<UISettings gridWidth="32.000000" grid="false" snap="true" gridHeight="32.000000" gridR="158.000000" gridG="180.000000" gridB="255.000000" zoomFactor="1.000000" windowMask="false" associatedLayout="" />
<GroupesObjets />
<Objets>
<Objet nom="NouvelObjet" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="2DWoodBox.jpg">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="32.000000" Y="32.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
<Objet nom="NouvelObjet1" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="asteroid7.png">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="28.000000" Y="28.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
</Objets>
<Layers>
<Layer Name="" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
</Layers>
<Variables />
<BehaviorsSharedDatas />
<Positions>
<Objet nom="NouvelObjet" x="489.500000" y="188.500000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
</Positions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="MettreXY" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value="MouseX()" />
<Parametre value="=" />
<Parametre value="MouseY()" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="SourisBouton" Contraire="false" />
<Parametre value="" />
<Parametre value="Left" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="Create" />
<Parametre value="" />
<Parametre value="NouvelObjet1" />
<Parametre value="MouseX()" />
<Parametre value="Random(500)" />
<Parametre value="" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="SourisBouton" Contraire="false" />
<Parametre value="" />
<Parametre value="Right" />
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="Create" />
<Parametre value="" />
<Parametre value="NouvelObjet1" />
<Parametre value="Random(800)" />
<Parametre value="MouseY()" />
<Parametre value="" />
</Action>
</Actions>
</Event>
</Events>
</Scene>
</Scenes>
<ExternalEvents />
<ExternalLayouts />
<ExternalSourceFiles />
</Project>

View File

@@ -1,240 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project firstLayout="">
<gdVersion build="76" major="3" minor="6" revision="0" />
<properties linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="TextObject" />
<extension name="TextEntryObject" />
</extensions>
<platforms>
<platform name="GDevelop C++ platform" />
<platform name="GDevelop JS platform" />
</platforms>
<currentPlatform>GDevelop C++ platform</currentPlatform>
</properties>
<resources>
<resources />
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="212" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="212" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="212">
<uiSettings associatedLayout="" grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Text" width="0.000000" x="449.000031" y="252.000000" zOrder="0">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Entry" width="0.000000" x="485.000000" y="251.000000" zOrder="0">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Text" width="0.000000" x="60.000031" y="244.000000" zOrder="0">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="Entry" width="0.000000" x="110.000031" y="248.000000" zOrder="0">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="Entry" type="TextEntryObject::TextEntry">
<variables />
<behaviors />
</object>
<object bold="false" italic="false" name="Text" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>(Text used to display user input)</string>
<font></font>
<characterSize>20</characterSize>
<color b="0" g="0" r="0" />
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="109" g="230" r="255" textB="0" textG="0" textR="0" />
<comment>Simply type a text on keyboard.</comment>
<comment2>Tapez un texte au clavier.</comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>Entry</parameter>
<parameter>&gt;</parameter>
<parameter>MouseX()</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextEntryObject::Activate" />
<parameters>
<parameter>Entry</parameter>
<parameter>no</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="TextEntryObject::String" />
<parameters>
<parameter>Entry</parameter>
<parameter>=</parameter>
<parameter>&quot;Was deactivated&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>Entry</parameter>
<parameter>&lt;=</parameter>
<parameter>MouseX()</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextEntryObject::Activate" />
<parameters>
<parameter>Entry</parameter>
<parameter>yes</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>Text</parameter>
<parameter>&lt;</parameter>
<parameter>400</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>Entry</parameter>
<parameter>&lt;</parameter>
<parameter>400</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>Text</parameter>
<parameter>=</parameter>
<parameter>Entry.String()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>Text</parameter>
<parameter>&gt;</parameter>
<parameter>400</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>Entry</parameter>
<parameter>&gt;</parameter>
<parameter>400</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>Text</parameter>
<parameter>=</parameter>
<parameter>Entry.String()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,252 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="91" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="com.example.gamename" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="spship.png" kind="image" name="spship.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="tank1fr1.png" kind="image" name="tank1fr1.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="tank2fr2.png" kind="image" name="tank2fr2.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="371.000031" y="237.999878" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="483.000000" y="99.999969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="395.000031" y="203.999969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="NewObject" type="Sprite">
<variables />
<behaviors />
<animations>
<animation name="Walk" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="spship.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="41.500000" y="41.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="83.000000" y="0.000000" />
<vertice x="83.000000" y="83.000000" />
<vertice x="0.000000" y="83.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="tank1fr1.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="31.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="62.000000" />
<vertice x="0.000000" y="62.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
<animation name="Shoot" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="tank2fr2.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="31.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="62.000000" />
<vertice x="0.000000" y="62.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="true" value="SourisSurObjet" />
<parameters>
<parameter>NewObject</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="SetAnimationName" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&quot;Shoot&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisSurObjet" />
<parameters>
<parameter>NewObject</parameter>
<parameter></parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="SetAnimationName" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&quot;Walk&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="AnimationName" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&quot;Walk&quot;</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>20</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="ModVarSceneTxt" />
<parameters>
<parameter>Test</parameter>
<parameter>=</parameter>
<parameter>NewObject.AnimationName()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,118 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="88" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="com.example.gamename" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources />
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings associatedLayout="" grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances />
<objects />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="Toujours" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="BuiltinCommonInstructions::And" />
<parameters />
<subConditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>Space</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="BuiltinCommonInstructions::Once" />
<parameters />
<subConditions />
</condition>
</subConditions>
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="SceneBackground" />
<parameters>
<parameter></parameter>
<parameter>&quot;221;0;0&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,217 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project>
<GDVersion Major="3" Minor="0" Build="11297" Revision="57008" />
<Info winExecutableFilename="" winExecutableIconFile="" linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false">
<Nom value="Projet" />
<Auteur value="" />
<Extensions>
<Extension name="BuiltinObject" />
<Extension name="BuiltinAudio" />
<Extension name="BuiltinVariables" />
<Extension name="BuiltinTime" />
<Extension name="BuiltinMouse" />
<Extension name="BuiltinKeyboard" />
<Extension name="BuiltinJoystick" />
<Extension name="BuiltinCamera" />
<Extension name="BuiltinWindow" />
<Extension name="BuiltinFile" />
<Extension name="BuiltinNetwork" />
<Extension name="BuiltinScene" />
<Extension name="BuiltinAdvanced" />
<Extension name="Sprite" />
<Extension name="BuiltinCommonInstructions" />
<Extension name="BuiltinCommonConversions" />
<Extension name="BuiltinStringInstructions" />
<Extension name="BuiltinMathematicalTools" />
<Extension name="BuiltinExternalLayouts" />
</Extensions>
<Platforms current="GDevelop JS platform">
<Platform name="GDevelop JS platform" />
</Platforms>
<WindowW value="800" />
<WindowH value="600" />
<Portable />
<LatestCompilationDirectory value="" />
<FPSmax value="60" />
<FPSmin value="10" />
<verticalSync value="false" />
</Info>
<Resources>
<Resources>
<Resource kind="image" name="2DWoodBox.jpg" alwaysLoaded="false" smoothed="true" userAdded="false" file="2DWoodBox.jpg" />
</Resources>
<ResourceFolders />
</Resources>
<Objects />
<ObjectGroups />
<Variables />
<Scenes>
<Scene nom="Nouvelle sc<73>ne" r="209.000000" v="209.000000" b="209.000000" titre="" oglFOV="90.000000" oglZNear="1.000000" oglZFar="500.000000" standardSortMethod="true" stopSoundsOnStartup="true" disableInputWhenNotFocused="true">
<UISettings gridWidth="32.000000" grid="false" snap="true" gridHeight="32.000000" gridR="158.000000" gridG="180.000000" gridB="255.000000" zoomFactor="1.000000" windowMask="false" associatedLayout="" />
<GroupesObjets />
<Objets>
<Objet nom="NouvelObjet" type="Sprite">
<Variables />
<Animations>
<Animation typeNormal="false">
<Direction boucle="false" tempsEntre="1.000000">
<Sprites>
<Sprite image="2DWoodBox.jpg">
<Points />
<PointOrigine nom="origine" X="0.000000" Y="0.000000" />
<PointCentre nom="centre" X="32.000000" Y="32.000000" automatic="true" />
<CustomCollisionMask custom="false" />
</Sprite>
</Sprites>
</Direction>
</Animation>
</Animations>
</Objet>
</Objets>
<Layers>
<Layer Name="" Visibility="true">
<Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
</Layer>
</Layers>
<Variables />
<BehaviorsSharedDatas />
<Positions>
<Objet nom="NouvelObjet" x="311.500000" y="142.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="513.500000" y="143.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="104.500000" y="134.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="315.500000" y="292.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="512.500000" y="292.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="114.500000" y="293.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="107.500000" y="430.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="316.500000" y="432.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
<Objet nom="NouvelObjet" x="509.500000" y="448.000000" plan="1" layer="" angle="0.000000" personalizedSize="false" width="0.000000" height="0.000000" locked="false">
<floatInfos />
<stringInfos />
<InitialVariables />
</Objet>
</Positions>
<Events>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="PosX" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="&lt;" />
<Parametre value="400" />
</Condition>
<Condition>
<Type value="BuiltinCommonInstructions::Or" Contraire="false" />
<SubConditions>
<Condition>
<Type value="PosY" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="&lt;" />
<Parametre value="250" />
</Condition>
<Condition>
<Type value="PosY" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="&gt;" />
<Parametre value="400" />
</Condition>
<Condition>
<Type value="BuiltinCommonInstructions::Or" Contraire="false" />
<SubConditions>
<Condition>
<Type value="PosY" Contraire="false" />
<Parametre value="NouvelObjet" />
<Parametre value="=" />
<Parametre value="292" />
</Condition>
</SubConditions>
</Condition>
</SubConditions>
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="ChangeDirection" />
<Parametre value="NouvelObjet" />
<Parametre value="+" />
<Parametre value="1" />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions />
<Actions>
<Action>
<Type value="SceneBackground" />
<Parametre value="" />
<Parametre value='&quot;29;48;222&quot;' />
</Action>
</Actions>
</Event>
<Event disabled="false" folded="false">
<Type value="BuiltinCommonInstructions::Standard" />
<Conditions>
<Condition>
<Type value="BuiltinCommonInstructions::Not" Contraire="false" />
<SubConditions>
<Condition>
<Type value="KeyPressed" Contraire="false" />
<Parametre value="" />
<Parametre value="a" />
</Condition>
<Condition>
<Type value="KeyPressed" Contraire="false" />
<Parametre value="" />
<Parametre value="b" />
</Condition>
</SubConditions>
</Condition>
</Conditions>
<Actions>
<Action>
<Type value="SceneBackground" />
<Parametre value="" />
<Parametre value='&quot;255;128;64&quot;' />
</Action>
</Actions>
</Event>
</Events>
</Scene>
</Scenes>
<ExternalEvents />
<ExternalLayouts />
<ExternalSourceFiles />
</Project>

View File

@@ -1,322 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="89" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="PanelSpriteObject" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="gem2z.png" kind="image" name="gem2z.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="Block-Gel.png" kind="image" name="Block-Gel.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="panelSprite.png" kind="image" name="panelSprite.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="panelSprite2.png" kind="image" name="panelSprite2.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="Block-Place-with-cross.png" kind="image" name="Block-Place-with-cross.png" smoothed="true" userAdded="true" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="-44.169621" customSize="true" height="191.000000" layer="" locked="false" name="NewObject" width="84.000000" x="624.500000" y="265.499969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="196.000000" layer="" locked="false" name="NewObject" width="188.000000" x="103.500000" y="87.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="46.193581" customSize="true" height="60.000000" layer="" locked="false" name="NewObject" width="46.000000" x="555.500000" y="134.499969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="28.000000" layer="" locked="false" name="NewObject" width="338.000000" x="-1.500031" y="471.499969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="60.000000" layer="" locked="false" name="NewObject" width="46.000000" x="469.500000" y="213.499969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="191.000000" layer="" locked="false" name="NewObject" width="84.000000" x="330.499969" y="311.499969" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="45.999985" layer="" locked="false" name="NewObject2" width="94.000000" x="444.499969" y="56.500031" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="85.999969" layer="" locked="false" name="NewObject3" width="736.000000" x="29.000000" y="504.000000" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="164.000015" layer="" locked="false" name="NewObject3" width="200.000000" x="590.000000" y="6.000000" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="174.000000" layer="" locked="false" name="NewObject4" width="210.000000" x="433.000061" y="316.000000" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object bottomMargin="10.000000" height="64.000000" leftMargin="50.000000" name="NewObject" rightMargin="7.000000" texture="Block-Place-with-cross.png" tiled="false" topMargin="30.000000" type="PanelSpriteObject::PanelSprite" width="64.000000">
<variables />
<behaviors />
</object>
<object bottomMargin="10.000000" height="64.000000" leftMargin="10.000000" name="NewObject2" rightMargin="10.000000" texture="gem2z.png" tiled="false" topMargin="10.000000" type="PanelSpriteObject::PanelSprite" width="64.000000">
<variables />
<behaviors />
</object>
<object bottomMargin="32.000000" height="64.000000" leftMargin="32.000000" name="NewObject3" rightMargin="32.000000" texture="panelSprite.png" tiled="true" topMargin="32.000000" type="PanelSpriteObject::PanelSprite" width="64.000000">
<variables />
<behaviors />
</object>
<object bottomMargin="32.000000" height="64.000000" leftMargin="32.000000" name="NewObject4" rightMargin="32.000000" texture="panelSprite2.png" tiled="true" topMargin="32.000000" type="PanelSpriteObject::PanelSprite" width="64.000000">
<variables />
<behaviors />
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="AddForceVersPos" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>MouseX(&quot;&quot;,0)</parameter>
<parameter>MouseY(&quot;&quot;,0)</parameter>
<parameter>100</parameter>
<parameter>0</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="RotateTowardPosition" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>MouseX(&quot;&quot;,0)</parameter>
<parameter>MouseY(&quot;&quot;,0)</parameter>
<parameter>90</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="SeparateFromObjects" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>NewObject</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>Space</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="PanelSpriteObject::Width" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>+</parameter>
<parameter>40*TimeDelta()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>j</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="PanelSpriteObject::Width" />
<parameters>
<parameter>NewObject4</parameter>
<parameter>+</parameter>
<parameter>40*TimeDelta()</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="PanelSpriteObject::Width" />
<parameters>
<parameter>NewObject3</parameter>
<parameter>+</parameter>
<parameter>40*TimeDelta()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>b</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="PanelSpriteObject::Image" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>&quot;Block-Gel.png&quot;</parameter>
<parameter>40*TimeDelta()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>a</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="BuiltinCommonInstructions::Once" />
<parameters />
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="PanelSpriteObject::Width" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>+</parameter>
<parameter>40*TimeDelta()</parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Repeat</type>
<repeatExpression>200</repeatExpression>
<conditions />
<actions>
<action>
<type inverted="false" value="Create" />
<parameters>
<parameter></parameter>
<parameter>NewObject2</parameter>
<parameter>Random(800)</parameter>
<parameter>Random(600)</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,547 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="85" major="4" minor="0" revision="0" />
<properties linuxExecutableFilename="" macExecutableFilename="" packageName="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="PathfindingBehavior" />
<extension name="TextObject" />
</extensions>
<platforms>
<platform name="GDevelop C++ platform" />
<platform name="GDevelop JS platform" />
</platforms>
<currentPlatform>GDevelop C++ platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="checkerboard.png" kind="image" name="checkerboard.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="blue_dot.png" kind="image" name="blue_dot.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="red_dot.png" kind="image" name="red_dot.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="green_dot.png" kind="image" name="green_dot.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="lightblue_small_dot.png" kind="image" name="lightblue_small_dot.png" smoothed="true" userAdded="true" />
<resource alwaysLoaded="false" file="gray_block.png" kind="image" name="gray_block.png" smoothed="true" userAdded="true" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings associatedLayout="" grid="true" gridB="255" gridG="180" gridHeight="16" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="16" snap="true" windowMask="false" zoomFactor="1.875346" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="blue_dot" width="0.000000" x="448.000000" y="352.000000" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="red_dot" width="0.000000" x="448.000000" y="256.000000" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="debug" width="0.000000" x="16.000000" y="16.000000" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="checkerboard" width="0.000000" x="0.000000" y="0.000000" zOrder="-5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="448.000000" y="304.000000" zOrder="6">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="320.000000" y="336.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="512.000000" y="352.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="384.000000" y="336.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="384.000000" y="448.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="448.000000" y="336.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="448.000000" y="400.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="368.000000" y="352.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="336.000000" y="480.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="544.000000" y="480.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="384.000000" y="432.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="544.000000" y="352.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="544.000000" y="416.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="544.000000" y="480.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="448.000000" y="464.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="480.000000" y="496.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="352.000000" y="496.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="416.000000" y="496.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="336.000000" y="352.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="336.000000" y="416.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="480.000000" y="400.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="gray_block" width="0.000000" x="384.000000" y="304.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="64.000000" layer="" locked="false" name="gray_block" width="16.000000" x="512.000000" y="336.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="checkerboard" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="checkerboard.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="512.000000" y="512.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="1024.000000" y="0.000000" />
<vertice x="1024.000000" y="1024.000000" />
<vertice x="0.000000" y="1024.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="blue_dot" type="Sprite">
<variables />
<behaviors>
<behavior acceleration="400.000000" allowDiagonals="true" angleOffset="0.000000" angularMaxSpeed="180.000000" cellHeight="16" cellWidth="16" extraBorder="0.000000" maxSpeed="200.000000" name="Pathfinding" rotateObject="false" type="PathfindingBehavior::PathfindingBehavior" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="blue_dot.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="8.000000" y="8.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="16.000000" y="0.000000" />
<vertice x="16.000000" y="16.000000" />
<vertice x="0.000000" y="16.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="red_dot" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="red_dot.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="8.000000" y="8.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="16.000000" y="0.000000" />
<vertice x="16.000000" y="16.000000" />
<vertice x="0.000000" y="16.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="green_dot" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="green_dot.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="8.000000" y="8.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="16.000000" y="0.000000" />
<vertice x="16.000000" y="16.000000" />
<vertice x="0.000000" y="16.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="lightblue_small_dot" type="Sprite">
<variables />
<behaviors />
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="lightblue_small_dot.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="8.000000" y="8.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="16.000000" y="0.000000" />
<vertice x="16.000000" y="16.000000" />
<vertice x="0.000000" y="16.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object bold="true" italic="false" name="debug" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>Text</string>
<font></font>
<characterSize>20</characterSize>
<color b="0" g="0" r="255" />
</object>
<object name="gray_block" type="Sprite">
<variables />
<behaviors>
<behavior cost="2.000000" impassable="true" name="PathfindingObstacle" type="PathfindingBehavior::PathfindingObstacleBehavior" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="gray_block.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="32.000000" y="8.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="64.000000" y="0.000000" />
<vertice x="64.000000" y="16.000000" />
<vertice x="0.000000" y="16.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="SourisBouton" />
<parameters>
<parameter></parameter>
<parameter>Left</parameter>
</parameters>
<subConditions />
</condition>
<condition>
<type inverted="false" value="BuiltinCommonInstructions::Once" />
<parameters />
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="MettreXY" />
<parameters>
<parameter>red_dot</parameter>
<parameter>=</parameter>
<parameter>ceil(MouseX(&quot;&quot;,0)/16-1)*16</parameter>
<parameter>=</parameter>
<parameter>ceil(MouseY(&quot;&quot;,0)/16-1)*16</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="PathfindingBehavior::SetDestination" />
<parameters>
<parameter>blue_dot</parameter>
<parameter>Pathfinding</parameter>
<parameter></parameter>
<parameter>red_dot.X()</parameter>
<parameter>red_dot.Y()</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="Delete" />
<parameters>
<parameter>lightblue_small_dot</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="TextObject::String" />
<parameters>
<parameter>debug</parameter>
<parameter>=</parameter>
<parameter>&quot;X: &quot; + LargeNumberToString(ceil(MouseX(&quot;&quot;,0)/16-1)*16) + &quot; Y: &quot; + LargeNumberToString(ceil(MouseY(&quot;&quot;,0)/16-1)*16)</parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>iPath</parameter>
<parameter>=</parameter>
<parameter>0</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false" infiniteLoopWarning="true">
<type>BuiltinCommonInstructions::While</type>
<whileConditions>
<condition>
<type inverted="false" value="VarScene" />
<parameters>
<parameter>iPath</parameter>
<parameter>&lt;</parameter>
<parameter>blue_dot.Pathfinding::NodeCount()</parameter>
</parameters>
<subConditions />
</condition>
</whileConditions>
<conditions />
<actions>
<action>
<type inverted="false" value="Create" />
<parameters>
<parameter></parameter>
<parameter>lightblue_small_dot</parameter>
<parameter>blue_dot.Pathfinding::GetNodeX(Variable(iPath))</parameter>
<parameter>blue_dot.Pathfinding::GetNodeY(Variable(iPath))</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarScene" />
<parameters>
<parameter>iPath</parameter>
<parameter>+</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="PathfindingBehavior::MaxSpeed" />
<parameters>
<parameter>blue_dot</parameter>
<parameter>Pathfinding</parameter>
<parameter>=</parameter>
<parameter>100</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>Escape</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Quit" />
<parameters>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData>
<behaviorSharedData name="Pathfinding" type="PathfindingBehavior::PathfindingBehavior" />
<behaviorSharedData name="PathfindingObstacle" type="PathfindingBehavior::PathfindingObstacleBehavior" />
</behaviorsSharedData>
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

View File

@@ -1,533 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project firstLayout="">
<gdVersion build="94" major="4" minor="0" revision="0" />
<properties folderProject="false" linuxExecutableFilename="" macExecutableFilename="" packageName="com.example.gamename" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="TextObject" />
</extensions>
<platforms>
<platform name="GDevelop JS platform" />
<platform name="GDevelop C++ platform" />
</platforms>
<currentPlatform>GDevelop JS platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="algae-big.png" kind="image" name="algae-big.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="algae.png" kind="image" name="algae.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="bush.png" kind="image" name="bush.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="559.000000" y="152.000015" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="114.999969" y="150.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="436.999939" y="140.000015" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="323.000000" y="316.000031" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject" width="0.000000" x="233.000000" y="316.000031" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject2" width="0.000000" x="191.000015" y="502.000031" zOrder="2">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="ShouldNotMove" width="0.000000" x="496.999939" y="518.000000" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="ShouldTurnSlowly" width="0.000000" x="333.000000" y="246.000015" zOrder="4">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="ShouldTurnFaster" width="0.000000" x="237.000015" y="248.000000" zOrder="5">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="ShouldTurnFastest" width="0.000000" x="115.000015" y="74.000015" zOrder="6">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject3" width="0.000000" x="585.000000" y="516.000000" zOrder="7">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="ShouldNotMove" width="0.000000" x="440.999969" y="81.999985" zOrder="3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="NewObject" type="Sprite" updateIfNotVisible="true">
<variables />
<behaviors />
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="algae-big.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="36.000000" y="25.500000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="72.000000" y="0.000000" />
<vertice x="72.000000" y="51.000000" />
<vertice x="0.000000" y="51.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="NewObject2" type="Sprite" updateIfNotVisible="true">
<variables />
<behaviors />
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="algae.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="25.500000" y="36.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="51.000000" y="0.000000" />
<vertice x="51.000000" y="72.000000" />
<vertice x="0.000000" y="72.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object bold="false" italic="false" name="ShouldNotMove" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>Should not move:</string>
<font></font>
<characterSize>20</characterSize>
<color b="255" g="255" r="255" />
</object>
<object bold="false" italic="false" name="ShouldTurnSlowly" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>Should&#x0A; turn&#x0A; slowly:</string>
<font></font>
<characterSize>20</characterSize>
<color b="255" g="255" r="255" />
</object>
<object bold="false" italic="false" name="ShouldTurnFaster" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>Should&#x0A; turn&#x0A; faster:</string>
<font></font>
<characterSize>20</characterSize>
<color b="255" g="255" r="255" />
</object>
<object bold="false" italic="false" name="ShouldTurnFastest" smoothed="true" type="TextObject::Text" underlined="false">
<variables />
<behaviors />
<string>Should&#x0A; turn&#x0A; fastest:</string>
<font></font>
<characterSize>20</characterSize>
<color b="255" g="255" r="255" />
</object>
<object name="NewObject3" type="Sprite" updateIfNotVisible="true">
<variables />
<behaviors />
<animations>
<animation name="" useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="bush.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="35.000000" y="35.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="70.000000" y="0.000000" />
<vertice x="70.000000" y="70.000000" />
<vertice x="0.000000" y="70.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&lt;</parameter>
<parameter>400</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>10</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&lt;</parameter>
<parameter>300</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>150</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="109" g="230" r="255" textB="0" textG="0" textR="0" />
<comment>This event can reuse NewObject list from its parent:</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosY" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&lt;</parameter>
<parameter>200</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>150</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PosX" />
<parameters>
<parameter>NewObject</parameter>
<parameter>&lt;</parameter>
<parameter>900</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>1</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="ModVarGlobal" />
<parameters>
<parameter>loopCount</parameter>
<parameter>=</parameter>
<parameter>0</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false" infiniteLoopWarning="true">
<type>BuiltinCommonInstructions::While</type>
<whileConditions>
<condition>
<type inverted="false" value="VarGlobal" />
<parameters>
<parameter>loopCount</parameter>
<parameter>&lt;</parameter>
<parameter>150</parameter>
</parameters>
<subConditions />
</condition>
</whileConditions>
<conditions />
<actions />
<events>
<event disabled="false" folded="false" infiniteLoopWarning="true">
<type>BuiltinCommonInstructions::While</type>
<whileConditions>
<condition>
<type inverted="false" value="VarGlobal" />
<parameters>
<parameter>loopCount</parameter>
<parameter>&lt;</parameter>
<parameter>150</parameter>
</parameters>
<subConditions />
</condition>
</whileConditions>
<conditions />
<actions>
<action>
<type inverted="false" value="ModVarGlobal" />
<parameters>
<parameter>loopCount</parameter>
<parameter>+</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="109" g="230" r="255" textB="0" textG="0" textR="0" />
<comment>(No optimization here: a context from a while event cant be reused)</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject</parameter>
<parameter>-1</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions />
<events />
</event>
</events>
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions />
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="109" g="230" r="255" textB="0" textG="0" textR="0" />
<comment>(No optimization here: the event pick NewObject2 from the list of all objects of the scene)</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>150</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Comment</type>
<color b="109" g="230" r="255" textB="0" textG="0" textR="0" />
<comment>Lazy declaration: The list of NewObject3 objects should be declared only if conditions are fulfilled.</comment>
<comment2></comment2>
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="DepartScene" />
<parameters>
<parameter></parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject3</parameter>
<parameter>150</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="Rotate" />
<parameters>
<parameter>NewObject2</parameter>
<parameter>150</parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
</events>
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
<effects />
</layer>
</layers>
<behaviorsSharedData />
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,420 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project firstLayout="">
<gdVersion build="76" major="3" minor="6" revision="0" />
<properties linuxExecutableFilename="" macExecutableFilename="" useExternalSourceFiles="false" winExecutableFilename="" winExecutableIconFile="">
<name>Project</name>
<author></author>
<windowWidth>800</windowWidth>
<windowHeight>600</windowHeight>
<latestCompilationDirectory></latestCompilationDirectory>
<maxFPS>60</maxFPS>
<minFPS>10</minFPS>
<verticalSync>false</verticalSync>
<extensions>
<extension name="BuiltinObject" />
<extension name="BuiltinAudio" />
<extension name="BuiltinVariables" />
<extension name="BuiltinTime" />
<extension name="BuiltinMouse" />
<extension name="BuiltinKeyboard" />
<extension name="BuiltinJoystick" />
<extension name="BuiltinCamera" />
<extension name="BuiltinWindow" />
<extension name="BuiltinFile" />
<extension name="BuiltinNetwork" />
<extension name="BuiltinScene" />
<extension name="BuiltinAdvanced" />
<extension name="Sprite" />
<extension name="BuiltinCommonInstructions" />
<extension name="BuiltinCommonConversions" />
<extension name="BuiltinStringInstructions" />
<extension name="BuiltinMathematicalTools" />
<extension name="BuiltinExternalLayouts" />
<extension name="PlatformBehavior" />
</extensions>
<platforms>
<platform name="GDevelop C++ platform" />
<platform name="GDevelop JS platform" />
</platforms>
<currentPlatform>GDevelop C++ platform</currentPlatform>
</properties>
<resources>
<resources>
<resource alwaysLoaded="false" file="Creature.png" kind="image" name="Creature.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="2DWoodBox.jpg" kind="image" name="2DWoodBox.jpg" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="p3_front.png" kind="image" name="p3_front.png" smoothed="true" userAdded="false" />
<resource alwaysLoaded="false" file="p3_jump.png" kind="image" name="p3_jump.png" smoothed="true" userAdded="false" />
</resources>
<resourceFolders />
</resources>
<objects />
<objectsGroups />
<variables />
<layouts>
<layout b="209" disableInputWhenNotFocused="true" mangledName="New_32scene" name="New scene" oglFOV="90.000000" oglZFar="500.000000" oglZNear="1.000000" r="209" standardSortMethod="true" stopSoundsOnStartup="true" title="" v="209">
<uiSettings associatedLayout="" grid="false" gridB="255" gridG="180" gridHeight="32" gridOffsetX="0" gridOffsetY="0" gridR="158" gridWidth="32" snap="true" windowMask="false" zoomFactor="1.000000" />
<objectsGroups />
<variables />
<instances>
<instance angle="0.000000" customSize="true" height="45.000000" layer="" locked="false" name="NewObject" width="33.000000" x="184.000000" y="267.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="195.000000" layer="" locked="false" name="NewObject2" width="90.000000" x="156.999985" y="318.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="-103.134018" customSize="true" height="82.000000" layer="" locked="false" name="NewObject2" width="406.999969" x="-436.000031" y="139.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="-15.802527" customSize="true" height="64.000000" layer="" locked="false" name="NewObject2" width="345.000000" x="-172.000015" y="364.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject2" width="0.000000" x="-198.000015" y="348.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="195.000000" layer="" locked="false" name="Moving" width="102.000000" x="262.000000" y="319.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="false" height="0.000000" layer="" locked="false" name="NewObject2" width="0.000000" x="353.000000" y="282.500000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="-3.972499" customSize="true" height="39.000000" layer="" locked="false" name="NewObject2" width="203.000000" x="156.999985" y="196.500015" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="-11.309942" customSize="true" height="14.000000" layer="" locked="false" name="Jumpthru" width="161.999985" x="-37.999985" y="275.000000" zOrder="1">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
<instance angle="0.000000" customSize="true" height="384.000000" layer="" locked="false" name="Ladder" width="30.000000" x="132.000000" y="-63.000000" zOrder="-3">
<numberProperties />
<stringProperties />
<initialVariables />
</instance>
</instances>
<objects>
<object name="NewObject" type="Sprite">
<variables />
<behaviors>
<behavior acceleration="1500.000000" deceleration="1500.000000" gravity="1000.000000" ignoreDefaultControls="false" jumpSpeed="600.000000" maxFallingSpeed="700.000000" maxSpeed="250.000000" name="PlatformerObject" slopeMaxAngle="60.000000" type="PlatformBehavior::PlatformerObjectBehavior" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="p3_front.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="33.000000" y="46.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="66.000000" y="0.000000" />
<vertice x="66.000000" y="92.000000" />
<vertice x="0.000000" y="92.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="p3_jump.png">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="33.500000" y="47.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="67.000000" y="0.000000" />
<vertice x="67.000000" y="94.000000" />
<vertice x="0.000000" y="94.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites />
</direction>
</directions>
</animation>
</animations>
</object>
<object name="NewObject2" type="Sprite">
<variables />
<behaviors>
<behavior name="Platform" platformType="NormalPlatform" type="PlatformBehavior::PlatformBehavior" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="2DWoodBox.jpg">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="32.000000" y="32.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="64.000000" y="0.000000" />
<vertice x="64.000000" y="64.000000" />
<vertice x="0.000000" y="64.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Moving" type="Sprite">
<variables />
<behaviors>
<behavior name="Platform" platformType="NormalPlatform" type="PlatformBehavior::PlatformBehavior" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="2DWoodBox.jpg">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="32.000000" y="32.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="64.000000" y="0.000000" />
<vertice x="64.000000" y="64.000000" />
<vertice x="0.000000" y="64.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Jumpthru" type="Sprite">
<variables />
<behaviors>
<behavior name="Platform" platformType="Jumpthru" type="PlatformBehavior::PlatformBehavior" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="2DWoodBox.jpg">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="32.000000" y="32.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="64.000000" y="0.000000" />
<vertice x="64.000000" y="64.000000" />
<vertice x="0.000000" y="64.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
<object name="Ladder" type="Sprite">
<variables />
<behaviors>
<behavior name="Platform" platformType="Ladder" type="PlatformBehavior::PlatformBehavior" />
</behaviors>
<animations>
<animation useMultipleDirections="false">
<directions>
<direction looping="false" timeBetweenFrames="1.000000">
<sprites>
<sprite hasCustomCollisionMask="false" image="2DWoodBox.jpg">
<points />
<originPoint name="origine" x="0.000000" y="0.000000" />
<centerPoint automatic="true" name="centre" x="32.000000" y="32.000000" />
<customCollisionMask>
<polygon>
<vertice x="0.000000" y="0.000000" />
<vertice x="64.000000" y="0.000000" />
<vertice x="64.000000" y="64.000000" />
<vertice x="0.000000" y="64.000000" />
</polygon>
</customCollisionMask>
</sprite>
</sprites>
</direction>
</directions>
</animation>
</animations>
</object>
</objects>
<events>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions>
<action>
<type inverted="false" value="MettreX" />
<parameters>
<parameter>Moving</parameter>
<parameter>=</parameter>
<parameter>263+sin(TimeFromStart())*50</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="MettreY" />
<parameters>
<parameter>Moving</parameter>
<parameter>=</parameter>
<parameter>319+sin(TimeFromStart())*50</parameter>
</parameters>
<subActions />
</action>
<action>
<type inverted="false" value="CameraX" />
<parameters>
<parameter></parameter>
<parameter>=</parameter>
<parameter>NewObject.X()</parameter>
<parameter></parameter>
<parameter></parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="KeyPressed" />
<parameters>
<parameter></parameter>
<parameter>Space</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="PlatformBehavior::ChangePlatformType" />
<parameters>
<parameter>Ladder</parameter>
<parameter>Platform</parameter>
<parameter>&quot;Platform&quot;</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PlatformBehavior::IsJumping" />
<parameters>
<parameter>NewObject</parameter>
<parameter>PlatformerObject</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ChangeAnimation" />
<parameters>
<parameter>NewObject</parameter>
<parameter>=</parameter>
<parameter>1</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions>
<condition>
<type inverted="false" value="PlatformBehavior::IsOnFloor" />
<parameters>
<parameter>NewObject</parameter>
<parameter>PlatformerObject</parameter>
</parameters>
<subConditions />
</condition>
</conditions>
<actions>
<action>
<type inverted="false" value="ChangeAnimation" />
<parameters>
<parameter>NewObject</parameter>
<parameter>=</parameter>
<parameter>0</parameter>
</parameters>
<subActions />
</action>
</actions>
<events />
</event>
<event disabled="false" folded="false">
<type>BuiltinCommonInstructions::Standard</type>
<conditions />
<actions />
<events />
</event>
</events>
<layers>
<layer name="" visibility="true">
<cameras>
<camera defaultSize="true" defaultViewport="true" height="0.000000" viewportBottom="1.000000" viewportLeft="0.000000" viewportRight="1.000000" viewportTop="0.000000" width="0.000000" />
</cameras>
</layer>
</layers>
<behaviorsSharedData>
<behaviorSharedData name="Platform" type="PlatformBehavior::PlatformBehavior" />
<behaviorSharedData name="PlatformerObject" type="PlatformBehavior::PlatformerObjectBehavior" />
</behaviorsSharedData>
</layout>
</layouts>
<externalEvents />
<externalLayouts />
<externalSourceFiles />
</project>

Some files were not shown because too many files have changed in this diff Show More