Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
L3 - Projet programmation 2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
v-lafeychine
L3 - Projet programmation 2
Commits
349cd255
Verified
Commit
349cd255
authored
3 years ago
by
v-lafeychine
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Add Main package + Add private values in Translation
parent
8e8a2048
No related branches found
Branches containing commit
No related tags found
1 merge request
!22
Resolve "Refactor: GameEngine"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/main/scala/App.scala
+2
-0
2 additions, 0 deletions
src/main/scala/App.scala
src/main/scala/PokemonGame.scala
+6
-1
6 additions, 1 deletion
src/main/scala/PokemonGame.scala
src/main/scala/engine/objects/Translation.scala
+3
-3
3 additions, 3 deletions
src/main/scala/engine/objects/Translation.scala
with
11 additions
and
4 deletions
src/main/scala/App.scala
+
2
−
0
View file @
349cd255
package
Main
import
SFML.Graphics.RenderWindow
import
SFML.Window.
{
VideoMode
,
Window
}
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/PokemonGame.scala
+
6
−
1
View file @
349cd255
package
Main
import
Engine.Game
import
Scene.Battle.
{
Battle
,
BattleScene
}
...
...
@@ -7,4 +9,7 @@ import Pokemon.{PokemonFactory, Trainer}
val
trainer
=
Trainer
(
""
,
List
(
PokemonFactory
(
"Bulbasaur"
),
PokemonFactory
(
"Squirtle"
)),
0
)
val
trainerEnemy
=
Trainer
(
""
,
List
(
PokemonFactory
(
"Charmander"
)),
0
)
class
PokemonGame
()
extends
Game
(
BattleScene
(
Battle
(
trainer
,
trainerEnemy
)));
/**
* The instance of the Pokemon game.
*/
class
PokemonGame
()
extends
Game
(
BattleScene
(
Battle
(
trainer
,
trainerEnemy
)))
This diff is collapsed.
Click to expand it.
src/main/scala/engine/objects/Translation.scala
+
3
−
3
View file @
349cd255
...
...
@@ -6,9 +6,9 @@ import Engine.Components.MonoBehaviour
import
SFML.System.Vector2f
class
Translation
(
position
:
Vector2f
,
frame
:
Int
)
extends
MonoBehaviour
:
val
initialPosition
=
Vector2f
()
val
vector
=
Vector2f
()
var
currentFrame
=
0
private
val
initialPosition
=
Vector2f
()
private
val
vector
=
Vector2f
()
private
var
currentFrame
=
0
def
init
(
engine
:
GameEngine
)
:
Unit
=
initialPosition
:=
gameObject
.
pos
*
(
1
/
gameObject
.
scale
)
...
...
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