Skip to content

Commit

Permalink
Merge pull request #121 from zheng-ze/Fix-RemotePowerup
Browse files Browse the repository at this point in the history
Update RemoteMoveEvent to RemoteSyncPositionEvent + Fix touch sensitivity
  • Loading branch information
Vanessamae23 authored Apr 20, 2024
2 parents f27d41e + 3f38cde commit 2725e4a
Show file tree
Hide file tree
Showing 46 changed files with 333 additions and 199 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "soldier-frame.png",
"filename" : "wizard-frame.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions TowerForge/TowerForge.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@
3CAC4A752BB6BDD500A5D22E /* HealthRenderStage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CAC4A742BB6BDD500A5D22E /* HealthRenderStage.swift */; };
3CBE72F92BC8D63500CC446A /* RemoteKillEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBE72F82BC8D63500CC446A /* RemoteKillEvent.swift */; };
3CBE72FB2BC8D63E00CC446A /* RemoteDamageEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBE72FA2BC8D63E00CC446A /* RemoteDamageEvent.swift */; };
3CBE72FD2BC8D64F00CC446A /* RemoteMoveEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBE72FC2BC8D64F00CC446A /* RemoteMoveEvent.swift */; };
3CBE72FD2BC8D64F00CC446A /* RemoteSyncPositionEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBE72FC2BC8D64F00CC446A /* RemoteSyncPositionEvent.swift */; };
3CBE72FF2BC8D66C00CC446A /* RemotePowerupEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBE72FE2BC8D66C00CC446A /* RemotePowerupEvent.swift */; };
3CBE73012BC8D69A00CC446A /* RemoteLifeEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBE73002BC8D69A00CC446A /* RemoteLifeEvent.swift */; };
3CBECF892BBE9797005EF39B /* TFNetworkCoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBECF882BBE9797005EF39B /* TFNetworkCoder.swift */; };
3CBECF8C2BBE9A41005EF39B /* TFRemoteEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBECF8B2BBE9A41005EF39B /* TFRemoteEvent.swift */; };
3CBECF8E2BBE9EAC005EF39B /* RemoteSpawnEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CBECF8D2BBE9EAC005EF39B /* RemoteSpawnEvent.swift */; };
3CCA1EEE2BD247E8009302F8 /* RemoteRemovePowerupEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CCA1EED2BD247E8009302F8 /* RemoteRemovePowerupEvent.swift */; };
3CCA1EF02BD2861B009302F8 /* UpdatePostionEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CCA1EEF2BD2861B009302F8 /* UpdatePostionEvent.swift */; };
3CCF9CAF2BAB1A96004D170E /* SceneUpdateDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CCF9CAE2BAB1A96004D170E /* SceneUpdateDelegate.swift */; };
3CCF9CB12BAB1BCE004D170E /* GameWorld.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CCF9CB02BAB1BCE004D170E /* GameWorld.swift */; };
3CCF9CB32BAB1F42004D170E /* SystemManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CCF9CB22BAB1F42004D170E /* SystemManager.swift */; };
Expand Down Expand Up @@ -319,12 +321,14 @@
3CAC4A742BB6BDD500A5D22E /* HealthRenderStage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthRenderStage.swift; sourceTree = "<group>"; };
3CBE72F82BC8D63500CC446A /* RemoteKillEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteKillEvent.swift; sourceTree = "<group>"; };
3CBE72FA2BC8D63E00CC446A /* RemoteDamageEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteDamageEvent.swift; sourceTree = "<group>"; };
3CBE72FC2BC8D64F00CC446A /* RemoteMoveEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteMoveEvent.swift; sourceTree = "<group>"; };
3CBE72FC2BC8D64F00CC446A /* RemoteSyncPositionEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteSyncPositionEvent.swift; sourceTree = "<group>"; };
3CBE72FE2BC8D66C00CC446A /* RemotePowerupEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemotePowerupEvent.swift; sourceTree = "<group>"; };
3CBE73002BC8D69A00CC446A /* RemoteLifeEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteLifeEvent.swift; sourceTree = "<group>"; };
3CBECF882BBE9797005EF39B /* TFNetworkCoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TFNetworkCoder.swift; sourceTree = "<group>"; };
3CBECF8B2BBE9A41005EF39B /* TFRemoteEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TFRemoteEvent.swift; sourceTree = "<group>"; };
3CBECF8D2BBE9EAC005EF39B /* RemoteSpawnEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteSpawnEvent.swift; sourceTree = "<group>"; };
3CCA1EED2BD247E8009302F8 /* RemoteRemovePowerupEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteRemovePowerupEvent.swift; sourceTree = "<group>"; };
3CCA1EEF2BD2861B009302F8 /* UpdatePostionEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdatePostionEvent.swift; sourceTree = "<group>"; };
3CCF9CAE2BAB1A96004D170E /* SceneUpdateDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneUpdateDelegate.swift; sourceTree = "<group>"; };
3CCF9CB02BAB1BCE004D170E /* GameWorld.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameWorld.swift; sourceTree = "<group>"; };
3CCF9CB22BAB1F42004D170E /* SystemManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemManager.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -632,10 +636,11 @@
3CBECF8D2BBE9EAC005EF39B /* RemoteSpawnEvent.swift */,
3CBE72F82BC8D63500CC446A /* RemoteKillEvent.swift */,
3CBE73002BC8D69A00CC446A /* RemoteLifeEvent.swift */,
3CBE72FC2BC8D64F00CC446A /* RemoteMoveEvent.swift */,
3CBE72FC2BC8D64F00CC446A /* RemoteSyncPositionEvent.swift */,
3CBE72FA2BC8D63E00CC446A /* RemoteDamageEvent.swift */,
3CD37AA62BBEC5EF00222D8A /* BaseRemoteEvent.swift */,
3CBE72FE2BC8D66C00CC446A /* RemotePowerupEvent.swift */,
3CCA1EED2BD247E8009302F8 /* RemoteRemovePowerupEvent.swift */,
3CD7DE372BCEB6D200CB21F0 /* RemoteConcedeEvent.swift */,
);
path = RemoteEvents;
Expand Down Expand Up @@ -1286,6 +1291,7 @@
3C9955C92BA5888F00D33FA5 /* SpawnEvent.swift */,
BA443D3E2BAD9774009F0FFB /* RemoveEvent.swift */,
5240D0AE2BB3B415004F1486 /* LifeEvent.swift */,
3CCA1EEF2BD2861B009302F8 /* UpdatePostionEvent.swift */,
527A077B2BB3F4CC00CD9D08 /* KillEvent.swift */,
9BC60BC72BB9BE6D001A6737 /* DisabledEvent.swift */,
3CD7DE392BCEB87900CB21F0 /* ConcedeEvent.swift */,
Expand Down Expand Up @@ -1616,7 +1622,7 @@
BA82C7792BCC6943000515A0 /* CenturionAchievement.swift in Sources */,
9B274DC82BD250420062715C /* NoCostPowerUp.swift in Sources */,
52A794172BBC4F690083C976 /* GamePlayer.swift in Sources */,
3CBE72FD2BC8D64F00CC446A /* RemoteMoveEvent.swift in Sources */,
3CBE72FD2BC8D64F00CC446A /* RemoteSyncPositionEvent.swift in Sources */,
3CE951632BAE037C008B2785 /* AiSystem.swift in Sources */,
3CE9515F2BADE2C5008B2785 /* ShootingSystem.swift in Sources */,
5240D0AB2BB3340F004F1486 /* CaptureTheFlagMode.swift in Sources */,
Expand Down Expand Up @@ -1702,6 +1708,8 @@
9B274DC42BD24B210062715C /* DamagePowerUp.swift in Sources */,
52DF5FE12BA3349600135367 /* TFTextures.swift in Sources */,
520062582BA8ED73000DBA30 /* HomeComponent.swift in Sources */,
3CCA1EEE2BD247E8009302F8 /* RemoteRemovePowerupEvent.swift in Sources */,
3CCA1EF02BD2861B009302F8 /* UpdatePostionEvent.swift in Sources */,
52DF5FA82BA32B2300135367 /* AppDelegate.swift in Sources */,
5240D08F2BAE6D0A004F1486 /* Point.swift in Sources */,
3C769A742BA591BD00F454F9 /* SpawnSystem.swift in Sources */,
Expand Down
33 changes: 24 additions & 9 deletions TowerForge/TowerForge/Commons/Constants/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,45 @@ class Constants {
}

struct PositionConstants {
private static let TOOLBAR_MID_Y = SizeConstants.TOOLBAR_HEIGHT / 2

static let POINTS_OWN = CGPoint(x: 70 / SizeConstants.SCALE_RATIO, y: TOOLBAR_MID_Y)

// Death Match Mode Properties Positions
static let DEATH_MATCH_POINT_OWN = CGPoint(x: 300, y: 50)
static let DEATH_MATCH_POINT_OPP = CGPoint(x: 300, y: 110)
static let DEATH_MATCH_POINT_OWN = CGPoint(x: 270 / SizeConstants.SCALE_RATIO,
y: TOOLBAR_MID_Y + SizeConstants.DEATH_MATCH_POINT_SIZE.height / 2 + 10)
static let DEATH_MATCH_POINT_OPP = CGPoint(x: 270 / SizeConstants.SCALE_RATIO,
y: TOOLBAR_MID_Y - SizeConstants.DEATH_MATCH_POINT_SIZE.height / 2 - 10)

// Capture the Flag Mode Properties
static let CTF_POINT_OWN = CGPoint(x: 300, y: 50)
static let CTF_POINT_OPP = CGPoint(x: 300, y: 110)
static let CTF_POINT_OWN = CGPoint(x: 270 / SizeConstants.SCALE_RATIO,
y: TOOLBAR_MID_Y + SizeConstants.CTF_POINT_SIZE.height / 2 + 10)
static let CTF_POINT_OPP = CGPoint(x: 270 / SizeConstants.SCALE_RATIO,
y: TOOLBAR_MID_Y - SizeConstants.CTF_POINT_SIZE.height / 2 - 10)

// Survival Mode Properties
static let SURVIVAL_POINT_OWN = CGPoint(x: 300, y: 100)
static let SURVIVAL_POINT_OWN = CGPoint(x: 270 / SizeConstants.SCALE_RATIO, y: TOOLBAR_MID_Y)

static let SUBTITLE_LABEL_OFFSET = CGPoint(x: 0, y: -30)
// Unit Node
static let UNIT_NODE_START = CGPoint(x: 450 / SizeConstants.SCALE_RATIO, y: TOOLBAR_MID_Y)

static let SUBTITLE_LABEL_OFFSET = CGPoint(x: 0, y: -30 / SizeConstants.SCALE_RATIO)
}

struct SizeConstants {
static let SCALE_RATIO = GameWorld.worldSize.height / UIScreen.main.bounds.height
static let TOOLBAR_HEIGHT = UIScreen.main.bounds.height / 5

static let POINT_SIZE = CGSize(width: 100 / SCALE_RATIO, height: 100 / SCALE_RATIO)

// Death Match Mode Properties Size
static let DEATH_MATCH_POINT_SIZE = CGSize(width: 50, height: 50)
static let DEATH_MATCH_POINT_SIZE = CGSize(width: 50 / SCALE_RATIO, height: 50 / SCALE_RATIO)

// Capture the Flag Mode Properties Size
static let CTF_POINT_SIZE = CGSize(width: 50, height: 50)
static let CTF_POINT_SIZE = CGSize(width: 50 / SCALE_RATIO, height: 50 / SCALE_RATIO)

// Survival Mode Properties Size
static let SURVIVAL_POINT_SIZE = CGSize(width: 100, height: 100)
static let SURVIVAL_POINT_SIZE = CGSize(width: 80 / SCALE_RATIO, height: 80 / SCALE_RATIO)

static let SCREEN_SIZE = CGSize(width: UIScreen.main.bounds.width,
height: UIScreen.main.bounds.height)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Vanessa Mae on 14/03/24.
//

import Foundation
import UIKit

class SpriteComponent: TFComponent {
var textures: TFTextures
Expand All @@ -14,6 +14,7 @@ class SpriteComponent: TFComponent {
var alpha = 1.0
var staticOnScreen = false
var zPosition: CGFloat
var tint: UIColor = .white

init(textureNames: [String], size: CGSize, animatableKey: String, zPosition: CGFloat = .zero) {
self.textures = TFTextures(textureNames: textureNames, textureAtlasName: "Sprites")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BaseTower: TFEntity {
maxHealth: CGFloat,
player: Player,
id: UUID = UUID()) {
super.init()
super.init(id: id)
// Core Components
self.addComponent(SpriteComponent(textureNames: textureNames, size: size,
animatableKey: key, zPosition: BaseTower.zPosition))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
import Foundation

class Point: TFEntity {
static let position = CGPoint(x: 100, y: 100)
static let size = CGSize(width: 100, height: 100)

init(initialPoint: Int) {
super.init()
let spriteComponent = SpriteComponent(textureNames: ["Coin"], size: Point.size, animatableKey: "point")
let spriteComponent = SpriteComponent(textureNames: ["Coin"], size: SizeConstants.POINT_SIZE,
animatableKey: "point")

self.addComponent(spriteComponent)
self.addComponent(HomeComponent(initialLifeCount: Team.lifeCount, pointInterval: Team.pointsInterval))
self.addComponent(LabelComponent(text: String(initialPoint), name: "point"))
self.addComponent(PositionComponent(position: Point.position))
self.addComponent(PositionComponent(position: PositionConstants.POINTS_OWN))
self.addComponent(PlayerComponent(player: .ownPlayer))

spriteComponent.staticOnScreen = true
Expand Down
66 changes: 40 additions & 26 deletions TowerForge/TowerForge/GameModule/Events/EventManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import Foundation

class EventManager {
typealias EventHandler = (TFEvent) -> Void
var eventTransformations: [any EventTransformation]
var eventTransformations: [UUID: any EventTransformation]
var eventQueue: [TFEvent]
var eventHandler: [TFEventTypeWrapper: [EventHandler]]
private(set) var remoteEventManager: RemoteEventManager?
private(set) var currentPlayer: GamePlayer?
private(set) var isHost = true

init(roomId: RoomId? = nil, isHost: Bool = true, currentPlayer: GamePlayer? = nil) {
eventTransformations = []
eventTransformations = [:]
eventQueue = []
eventHandler = [:]

Expand All @@ -38,7 +38,10 @@ class EventManager {
guard let remoteEventManager = remoteEventManager else {
return event.unpack(into: self, for: event.source) // Unpack for self
}
remoteEventManager.publisher.publish(remoteEvent: event)

DispatchQueue.global().async {
remoteEventManager.publisher.publish(remoteEvent: event)
}
}

func registerHandler<T: TFEvent>(forEvent eventType: T.Type, handler: @escaping EventHandler) {
Expand All @@ -56,37 +59,48 @@ class EventManager {
}

func addTransformation(eventTransformation: any EventTransformation) {
self.eventTransformations.append(eventTransformation)
self.eventTransformations[eventTransformation.id] = eventTransformation
}

func removeTransformation(eventTransformation: any EventTransformation) {
self.eventTransformations.removeAll(where: { $0.id == eventTransformation.id })
func removeTransformation(with id: UUID) {
self.eventTransformations.removeValue(forKey: id)
}

func executeEvents(in target: EventTarget) {
while !eventQueue.isEmpty {
var currentEvent = eventQueue.removeFirst()

for eventTransformation in eventTransformations {
if let concurrentEvent = currentEvent as? ConcurrentEvent {
currentEvent = concurrentEvent.transform(eventTransformation: eventTransformation)
} else {
currentEvent = eventTransformation.transformEvent(event: currentEvent)
}
}

var newEvents: [TFEvent] = []
let numEvents = eventQueue.count
for event in eventQueue {
let currentEvent = transform(event: event)
let output = currentEvent.execute(in: target)
output.events.forEach { eventQueue.append($0) }
newEvents.append(contentsOf: output.events)

updateHandlers(event: currentEvent)
}
eventQueue.removeFirst(numEvents)
eventQueue.append(contentsOf: newEvents)
}

private func transform(event: TFEvent) -> TFEvent {
var currentEvent = event
for eventTransformation in eventTransformations.values {
if let concurrentEvent = currentEvent as? ConcurrentEvent {
currentEvent = concurrentEvent.transform(eventTransformation: eventTransformation)
} else {
currentEvent = eventTransformation.transformEvent(event: currentEvent)
}
}
return currentEvent
}

// Get the type of the current event
let eventTypeWrapper = TFEventTypeWrapper(type: type(of: currentEvent))
private func updateHandlers(event: TFEvent) {
// Get the type of the current event
let eventTypeWrapper = TFEventTypeWrapper(type: type(of: event))

// Check if there are any handlers registered for this event type
if let handlers = eventHandler[eventTypeWrapper] {
// Execute each handler with the current event
for handler in handlers {
handler(currentEvent)
}
// Check if there are any handlers registered for this event type
if let handlers = eventHandler[eventTypeWrapper] {
// Execute each handler with the current event
for handler in handlers {
handler(event)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import Foundation

protocol EventTransformation: Identifiable, AnyObject {
var id: UUID { get}
init(player: Player)
static var DURATION: CGFloat { get } // Max duration
var id: UUID { get }
init(player: Player, id: UUID)
func transformEvent(event: TFEvent) -> TFEvent
}
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()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ struct WaveSpawnEvent: TFEvent {
let entityType: (PlayerSpawnable & TFEntity).Type
let player: Player

/// TODO: might need to change this to something other than throwing fatal error,
/// because it could cause accidental application crash, for example iterating through
/// a collection of TFEvents.
var entityId: UUID {
fatalError("entityId is not to be used here")
}

init<T: TFEntity & PlayerSpawnable>(ofType type: T.Type, timestamp: TimeInterval,
position: CGPoint, player: Player) {
self.timestamp = timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DeathMatchMode: GameMode {
guard gameState != .LOSE else {
return
}
guard remainingTime < 0 else {
guard remainingTime <= 0 else {
return
}
if currentOwnKillCounter > currentOpponentKillCounter {
Expand Down
8 changes: 2 additions & 6 deletions TowerForge/TowerForge/GameModule/GameWorld.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,10 @@ class GameWorld {
scene?.remove(node: popup)
}

func concede(playerid: UserPlayerId?) {
func concede(player: GamePlayer?) {
removeStatePopup()

guard let playerid = playerid else {
gameEngine.addEvent(ConcedeEvent(timestamp: Date().timeIntervalSince1970, player: .ownPlayer))
return
}
gameEngine.addRemoteEvent(RemoteConcedeEvent(source: playerid, targetIsSource: true))
gameEngine.addRemoteEvent(RemoteConcedeEvent(source: player ?? .defaultPlayer, targetIsSource: true))
}
}

Expand Down
6 changes: 3 additions & 3 deletions TowerForge/TowerForge/GameModule/PowerUps/DamagePowerUp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import Foundation

class DamagePowerUp: EventTransformation {
let DURATION = CGFloat(5)
static let DURATION = CGFloat(5)
let DAMAGE_SCALE = CGFloat(2)
let id: UUID
let player: Player

required init(player: Player = .ownPlayer) {
self.id = UUID()
required init(player: Player = .ownPlayer, id: UUID = UUID()) {
self.id = id
self.player = player
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ class DamagePowerUpDelegate: PowerUpNodeDelegate {
}

func powerUpNodeDidSelect() {
let damagePowerUp = DamagePowerUp()
eventManager.addTransformation(eventTransformation: damagePowerUp)

DispatchQueue.main.asyncAfter(deadline: .now() + damagePowerUp.DURATION) {
self.eventManager.removeTransformation(eventTransformation: damagePowerUp)
}
let remoteEvent = RemotePowerupEvent(powerup: .Damage, player: .ownPlayer,
source: eventManager.currentPlayer ?? .defaultPlayer)
eventManager.add(remoteEvent)
}
}
Loading

0 comments on commit 2725e4a

Please sign in to comment.