Skip to content
Snippets Groups Projects
Verified Commit 349cd255 authored by v-lafeychine's avatar v-lafeychine
Browse files

Fix: Add Main package + Add private values in Translation

parent 8e8a2048
No related branches found
No related tags found
1 merge request!22Resolve "Refactor: GameEngine"
package Main
import SFML.Graphics.RenderWindow
import SFML.Window.{VideoMode, Window}
......
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)))
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment