Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
ugamefeature-mde
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KritzJ
ugamefeature-mde
Commits
c558f1af
Commit
c558f1af
authored
3 years ago
by
KritzJ
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
4510c470
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projectMDE/conversions/ResultProgram_modded2.xmi
+142
-0
142 additions, 0 deletions
projectMDE/conversions/ResultProgram_modded2.xmi
with
142 additions
and
0 deletions
projectMDE/conversions/ResultProgram_modded2.xmi
0 → 100644
+
142
−
0
View file @
c558f1af
<?xml version="1.0" encoding="UTF-8"?>
<cs:Program
xmi:version=
"2.0"
xmlns:xmi=
"http://www.omg.org/XMI"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:cs=
"http://www.example.org/cs.ecore"
xsi:schemaLocation=
"http://www.example.org/cs.ecore ../metamodel/csProgram/CsProgram.ecore"
>
<files
filename=
"BarDisplayLives"
>
<namespaces
namespace=
"DSL"
>
<using>
UnityEngine
</using>
<using>
System
</using>
<typedefs
xsi:type=
"cs:Class"
identifier=
"BarDisplayLives"
baseType=
"//@externalTypes.0"
>
<members
identifier=
"maxValue"
>
<type
xsi:type=
"cs:PrimitiveType"
type=
"float"
/>
</members>
<members
identifier=
"barImage"
>
<type
xsi:type=
"cs:CompoundType"
referencedType=
"//@externalTypes.4"
/>
</members>
<methods
identifier=
"Update"
accessability=
"none"
>
<body>
barImage.fillAmount = DataManager.instance.GetLives()/maxValue;
</body>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
</typedefs>
</namespaces>
</files>
<files
filename=
"DataManager"
>
<namespaces
namespace=
"DSL"
>
<using>
UnityEngine
</using>
<using>
System
</using>
<typedefs
xsi:type=
"cs:Class"
identifier=
"DataManager"
baseType=
"//@externalTypes.0"
>
<members
identifier=
"instance"
specifier=
"static"
>
<type
xsi:type=
"cs:CompoundType"
referencedType=
"//@files.1/@namespaces.0/@typedefs.0"
/>
</members>
<members
identifier=
"lives"
>
<type
xsi:type=
"cs:PrimitiveType"
type=
"int"
/>
</members>
<methods
identifier=
"Awake"
accessability=
"private"
>
<body>
instance??= this;
</body>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
<methods
identifier=
"GetLives"
>
<body>
return this.lives;
</body>
<returnType
xsi:type=
"cs:PrimitiveType"
type=
"int"
/>
</methods>
<methods
identifier=
"SetLives"
>
<parameters
identifier=
"value"
>
<type
xsi:type=
"cs:PrimitiveType"
type=
"int"
/>
</parameters>
<body>
this.lives = value;
</body>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
</typedefs>
</namespaces>
</files>
<files
filename=
"HealthPack"
>
<namespaces
namespace=
"DSL"
>
<using>
UnityEngine
</using>
<using>
System
</using>
<typedefs
xsi:type=
"cs:Class"
identifier=
"HealthPack"
baseType=
"//@externalTypes.0"
>
<methods
identifier=
"Update"
accessability=
"none"
>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
<methods
identifier=
"Start"
accessability=
"none"
>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
<methods
identifier=
"OnTriggerEnter2D"
>
<parameters
identifier=
"collider"
>
<type
xsi:type=
"cs:CompoundType"
referencedType=
"//@externalTypes.5"
/>
</parameters>
<body>
if (collider.gameObject.tag ==
"
Player
"
) {
</body>
<body>
DataManager.instance.SetLives(DataManager.instance.GetLives()+1);
</body>
<body>
}
</body>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
</typedefs>
</namespaces>
</files>
<files
filename=
"Enemy"
>
<namespaces
namespace=
"DSL"
>
<using>
UnityEngine
</using>
<using>
System
</using>
<typedefs
xsi:type=
"cs:Class"
identifier=
"Enemy"
baseType=
"//@externalTypes.0"
>
<methods
identifier=
"Update"
accessability=
"none"
>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
<methods
identifier=
"Start"
accessability=
"none"
>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
<methods
identifier=
"OnTriggerEnter2D"
>
<parameters
identifier=
"collider"
>
<type
xsi:type=
"cs:CompoundType"
referencedType=
"//@externalTypes.5"
/>
</parameters>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
</typedefs>
</namespaces>
</files>
<files
filename=
"Character"
>
<namespaces
namespace=
"DSL"
>
<using>
UnityEngine
</using>
<using>
System
</using>
<typedefs
xsi:type=
"cs:Class"
identifier=
"Character"
baseType=
"//@externalTypes.0"
>
<members
identifier=
"speed"
>
<type
xsi:type=
"cs:PrimitiveType"
type=
"float"
/>
</members>
<members
identifier=
"horizontal"
accessability=
"private"
>
<type
xsi:type=
"cs:PrimitiveType"
type=
"float"
/>
</members>
<members
identifier=
"rigidbody"
>
<type
xsi:type=
"cs:CompoundType"
referencedType=
"//@externalTypes.2"
/>
</members>
<members
identifier=
"vertical"
accessability=
"private"
>
<type
xsi:type=
"cs:PrimitiveType"
type=
"float"
/>
</members>
<methods
identifier=
"Update"
accessability=
"none"
>
<body>
horizontal = Input.GetAxisRaw(
"
Horizontal
"
);
</body>
<body>
vertical = Input.GetAxisRaw(
"
Vertical
"
);
</body>
<body>
rigidbody.velocity = new Vector2(horizontal * speed, vertical * speed);
</body>
<body>
if (Input.GetKeyDown(KeyCode.P)) {
</body>
<body>
rigidbody.AddForce(new Vector2(1,0)*10.0f, ForceMode2D.Impulse);
</body>
<body>
}
</body>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
<methods
identifier=
"Start"
accessability=
"none"
>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
<methods
identifier=
"OnTriggerEnter2D"
>
<parameters
identifier=
"collider"
>
<type
xsi:type=
"cs:CompoundType"
referencedType=
"//@externalTypes.5"
/>
</parameters>
<body>
if (collider.gameObject.tag ==
"
Enemy
"
) {
</body>
<body>
DataManager.instance.SetLives(DataManager.instance.GetLives()-1);
</body>
<body>
}
</body>
<returnType
xsi:type=
"cs:PrimitiveType"
/>
</methods>
</typedefs>
</namespaces>
</files>
<externalTypes
identifier=
"MonoBehaviour"
importedFrom=
"UnityEngine"
/>
<externalTypes
identifier=
"Vector2"
importedFrom=
"UnityEngine"
type=
"struct"
/>
<externalTypes
identifier=
"Rigidbody2D"
importedFrom=
"UnityEngine"
/>
<externalTypes
identifier=
"Text"
importedFrom=
"UnityEngine.UI"
/>
<externalTypes
identifier=
"Image"
importedFrom=
"UnityEngine.UI"
/>
<externalTypes
identifier=
"Collider2D"
importedFrom=
"UnityEngine"
/>
<externalTypes
identifier=
"Collision2D"
importedFrom=
"UnityEngine"
/>
<externalTypes
identifier=
"GameObject"
importedFrom=
"UnityEngine"
/>
</cs:Program>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment