-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from zheng-ze/Fix-RemotePowerup
Update RemoteMoveEvent to RemoteSyncPositionEvent + Fix touch sensitivity
- Loading branch information
Showing
46 changed files
with
333 additions
and
199 deletions.
There are no files selected for viewing
Binary file modified
BIN
-20.2 KB
(93%)
TowerForge/Assets.xcassets/Sprites.spriteatlas/arrowTower.imageset/arrowTower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-27.6 KB
(91%)
TowerForge/Assets.xcassets/Sprites.spriteatlas/melee.imageset/melee-frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-28.7 KB
(91%)
TowerForge/Assets.xcassets/Sprites.spriteatlas/soldier.imageset/soldier-frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
TowerForge/Assets.xcassets/Sprites.spriteatlas/wizard.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-315 KB
TowerForge/Assets.xcassets/Sprites.spriteatlas/wizard.imageset/soldier-frame.png
Binary file not shown.
Binary file added
BIN
+287 KB
TowerForge/Assets.xcassets/Sprites.spriteatlas/wizard.imageset/wizard-frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
TowerForge/TowerForge/GameModule/Events/GameEvents/UpdatePostionEvent.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// UpdatePostionEvent.swift | ||
// TowerForge | ||
// | ||
// Created by Zheng Ze on 19/4/24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct UpdatePostionEvent: TFEvent { | ||
let timestamp: TimeInterval | ||
let entityId: UUID | ||
let position: CGPoint | ||
|
||
init(at timestamp: TimeInterval, entityId: UUID, position: CGPoint) { | ||
self.timestamp = timestamp | ||
self.entityId = entityId | ||
self.position = position | ||
} | ||
|
||
func execute(in target: any EventTarget) -> EventOutput { | ||
if let movementSystem = target.system(ofType: MovementSystem.self) { | ||
movementSystem.updatePosition(for: entityId, to: position) | ||
} | ||
return EventOutput() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.