Skip to content

Commit

Permalink
Update for latest GateEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
STREGA committed Sep 28, 2023
1 parent 0a8fe98 commit c2e0bbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/2D_JRPG/JRPG.swift
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ final class RoomSystem: System {
TileMap.Tile(id: $0.asInt(), options: [])
})
// We exppect the argument 3 to be a Double
let duration = args[3].asDouble()
let duration = args[3].asFloat()

// Add the tilemap animation to the rooms tilemap
self.entity[TileMapComponent.self].layers[layer].animations.append(
Expand Down Expand Up @@ -520,7 +520,7 @@ enum Player {
entity[Physics2DComponent.self].velocity = .zero
}

func update(for entity: Entity, inGame game: Game, input: HID, withTimePassed deltaTime: Double) {
func update(for entity: Entity, inGame game: Game, input: HID, withTimePassed deltaTime: Float) {
// A variable to store if any action input was pressed
var actionWasPressed = false

Expand Down Expand Up @@ -586,7 +586,7 @@ enum Player {
entity[SpriteComponent.self].activeAnimation?.progress = 0.5
}

func update(for entity: Entity, inGame game: Game, input: HID, withTimePassed deltaTime: Double) {
func update(for entity: Entity, inGame game: Game, input: HID, withTimePassed deltaTime: Float) {
// Check for inputs and move the character in the approproite direction
if input.keyboard.anyKeyIsPressed(in: ["a", .left]) || input.gamePads.any.dpad.left.isPressed {
// Use the left facing animation
Expand Down

0 comments on commit c2e0bbb

Please sign in to comment.