Change all english label to german

This commit is contained in:
Jakob Haag 2020-06-25 16:35:57 +02:00
parent 49c6017d8a
commit 9ff8bcb6e5
5 changed files with 21 additions and 21 deletions

View File

@ -92,14 +92,14 @@ class HUD: GKEntity {
finishButton = SingeClickButtonNode( finishButton = SingeClickButtonNode(
textureName: "yellow_button04", textureName: "yellow_button04",
text: "Done", text: "Fertig",
isEnabled: true, isEnabled: true,
position: CGPoint( position: CGPoint(
x: EntityManager.gameEMInstance.scene.size.width * 0.15, x: EntityManager.gameEMInstance.scene.size.width * 0.17,
y: EntityManager.gameEMInstance.scene.size.height * 0.06), y: EntityManager.gameEMInstance.scene.size.height * 0.06),
onButtonPress: { } onButtonPress: { }
) )
finishButton.size = CGSize(width: 80, height: 40) finishButton.size = CGSize(width: 125, height: 40)
finishButton.zPosition = 2 finishButton.zPosition = 2
backgroundRoundCounter = SKSpriteNode(texture: SKTexture(imageNamed: "roundInfo_texture")) backgroundRoundCounter = SKSpriteNode(texture: SKTexture(imageNamed: "roundInfo_texture"))
@ -148,7 +148,7 @@ class HUD: GKEntity {
func startWithDuration(){ func startWithDuration(){
roundTimer.startTimer() roundTimer.startTimer()
finishButton.isEnabled = true finishButton.isEnabled = true
self.roundTimer.roundEnded = "Syncing" self.roundTimer.roundEnded = "Berechnung"
RoundCalculatorService.sharedInstance.isCalculating = false RoundCalculatorService.sharedInstance.isCalculating = false
blockWholeScreenPane.isHidden = true blockWholeScreenPane.isHidden = true
} }
@ -156,7 +156,7 @@ class HUD: GKEntity {
func finishRound() -> () { func finishRound() -> () {
self.blockWholeScreenPane.isHidden = false self.blockWholeScreenPane.isHidden = false
self.roundTimer.timeLeft = 1; self.roundTimer.timeLeft = 1;
self.roundTimer.roundEnded = "Waiting for other player..." self.roundTimer.roundEnded = "Warte auf Gegner..."
} }
func initRoundInfo(size: CGSize) -> () { func initRoundInfo(size: CGSize) -> () {
@ -171,14 +171,14 @@ class HUD: GKEntity {
currentRoundLabel.zPosition = backgroundRoundCounter.zPosition + 1 currentRoundLabel.zPosition = backgroundRoundCounter.zPosition + 1
roundsLabel.zPosition = backgroundRoundCounter.zPosition + 1 roundsLabel.zPosition = backgroundRoundCounter.zPosition + 1
roundsLabel.text = "of \(RoundCalculatorService.sharedInstance.MAX_ROUNDS)" roundsLabel.text = "von \(RoundCalculatorService.sharedInstance.MAX_ROUNDS)"
roundsLabel.fontColor = SKColor.black roundsLabel.fontColor = SKColor.black
roundsLabel.verticalAlignmentMode = .center roundsLabel.verticalAlignmentMode = .center
roundsLabel.fontSize = 12 roundsLabel.fontSize = 12
roundsLabel.position = CGPoint(x: currentRoundLabel.position.x, y: currentRoundLabel.position.y - 25) roundsLabel.position = CGPoint(x: currentRoundLabel.position.x, y: currentRoundLabel.position.y - 25)
roundLabel.zPosition = backgroundRoundCounter.zPosition + 1 roundLabel.zPosition = backgroundRoundCounter.zPosition + 1
roundLabel.text = "Round" roundLabel.text = "Runde"
roundLabel.fontColor = SKColor.black roundLabel.fontColor = SKColor.black
roundLabel.verticalAlignmentMode = .center roundLabel.verticalAlignmentMode = .center
roundLabel.fontSize = 12 roundLabel.fontSize = 12

View File

@ -61,7 +61,7 @@ class Modal: GKEntity{
footer = SKLabelNode() footer = SKLabelNode()
case .PauseGame: case .PauseGame:
header = SKLabelNode(text: "Pause") header = SKLabelNode(text: "Pause")
body = SKLabelNode(text: "Waiting for player to reconnect") body = SKLabelNode(text: "Warte auf Gegner...")
footer = SKLabelNode() footer = SKLabelNode()
closeButton.zPosition = -1 closeButton.zPosition = -1
} }

View File

@ -153,7 +153,7 @@ class GameScene: SKScene{
self.childNode(withName: "hostLabel")?.run(SKAction.move(to: CGPoint(x: self.size.width * 0.25, y: self.size.height * 0.3), duration: 1)) self.childNode(withName: "hostLabel")?.run(SKAction.move(to: CGPoint(x: self.size.width * 0.25, y: self.size.height * 0.3), duration: 1))
self.childNode(withName: "peerLabel")?.run(SKAction.move(to: CGPoint(x: self.size.width * 0.75, y: self.size.height * 0.3), duration: 1)) self.childNode(withName: "peerLabel")?.run(SKAction.move(to: CGPoint(x: self.size.width * 0.75, y: self.size.height * 0.3), duration: 1))
self.initGameEndIcons() self.initGameEndIcons()
let node = ButtonNode(textureName: "yellow_button05", text: "Menu", isEnabled: true, position: CGPoint(x: self.size.width / 2, y: self.size.height / 2 - 300), onButtonPress: { let node = ButtonNode(textureName: "yellow_button05", text: "Menü", isEnabled: true, position: CGPoint(x: self.size.width / 2, y: self.size.height / 2 - 300), onButtonPress: {
self.backToMenuAction() self.backToMenuAction()
}) })
node.name = "BackButton" node.name = "BackButton"

View File

@ -36,7 +36,7 @@ class MenuScene: SKScene {
})) }))
entityManager.add(Button(name: "settingsButton", entityManager.add(Button(name: "settingsButton",
textureName: "gold_button_3", textureName: "gold_button_3",
text: "Settings", text: "Einstellungen",
position: CGPoint(x: midX, y: midY ), position: CGPoint(x: midX, y: midY ),
onButtonPress: { onButtonPress: {
let scene = SettingsScene(size: self.size) let scene = SettingsScene(size: self.size)

View File

@ -18,10 +18,10 @@ class SettingsScene: SKScene {
entityManager.setScene(scene: self) entityManager.setScene(scene: self)
let positionX = self.size.width * 0.1 let positionX = self.size.width * 0.1
let positionY = self.size.height * 0.05 let positionY = self.size.height * 0.05
isMusicDeactivatedByUserDefault ? setMusicButtonTextByUserDefault(text: "OFF") : setMusicButtonTextByUserDefault(text: "ON") isMusicDeactivatedByUserDefault ? setMusicButtonTextByUserDefault(text: "Aus") : setMusicButtonTextByUserDefault(text: "Ein")
entityManager.add(Button(name: "backToMenuScene", entityManager.add(Button(name: "backToMenuScene",
textureName: "yellow_button04", textureName: "yellow_button04",
text: "Back", text: "Zurück",
position: CGPoint(x: positionX, y: positionY), position: CGPoint(x: positionX, y: positionY),
onButtonPress: { onButtonPress: {
let scene = MenuScene(size: self.size) let scene = MenuScene(size: self.size)
@ -35,30 +35,30 @@ class SettingsScene: SKScene {
if SoundManager.sharedInstance.isMusicPlaying { if SoundManager.sharedInstance.isMusicPlaying {
SoundManager.sharedInstance.stopMenuMusic() SoundManager.sharedInstance.stopMenuMusic()
SoundManager.sharedInstance.isMusicEnabled = false SoundManager.sharedInstance.isMusicEnabled = false
self.entityManager.changeSettingsButtonText(buttonName: "StopMenuMusic", text: "OFF") self.entityManager.changeSettingsButtonText(buttonName: "StopMenuMusic", text: "Aus")
} else { } else {
SoundManager.sharedInstance.isMusicEnabled = true SoundManager.sharedInstance.isMusicEnabled = true
SoundManager.sharedInstance.startMenuMusic() SoundManager.sharedInstance.startMenuMusic()
self.entityManager.changeSettingsButtonText(buttonName: "StopMenuMusic", text: "ON") self.entityManager.changeSettingsButtonText(buttonName: "StopMenuMusic", text: "An")
} }
})) }))
entityManager.add(Button(name: "StopMovingBackground", entityManager.add(Button(name: "StopMovingBackground",
textureName: "yellow_button04", textureName: "yellow_button04",
text: "MOVE", text: "An",
position: CGPoint(x: self.size.width * 0.6, y: self.size.height / 2 - 100), position: CGPoint(x: self.size.width * 0.6, y: self.size.height / 2 - 100),
onButtonPress: { onButtonPress: {
if BackgroundComponent.isMovingBackgroundEnabled { if BackgroundComponent.isMovingBackgroundEnabled {
BackgroundComponent.isMovingBackgroundEnabled = false BackgroundComponent.isMovingBackgroundEnabled = false
self.entityManager.changeSettingsButtonText(buttonName: "StopMovingBackground", text: "STOP") self.entityManager.changeSettingsButtonText(buttonName: "StopMovingBackground", text: "Aus")
} else { } else {
BackgroundComponent.isMovingBackgroundEnabled = true BackgroundComponent.isMovingBackgroundEnabled = true
self.entityManager.changeSettingsButtonText(buttonName: "StopMovingBackground", text: "MOVE") self.entityManager.changeSettingsButtonText(buttonName: "StopMovingBackground", text: "An")
} }
})) }))
entityManager.add(Label(fontnamed: "Courier-Bold", entityManager.add(Label(fontnamed: "Courier-Bold",
name: "SettingsLabel", name: "SettingsLabel",
text: "Settings", text: "Einstellungen",
fontSize: 200.0, fontSize: 150.0,
fontColor: .black, fontColor: .black,
position: CGPoint(x: self.size.width * 0.5, y: self.size.height * 0.7), position: CGPoint(x: self.size.width * 0.5, y: self.size.height * 0.7),
horizontalAlignmentMode: .center, horizontalAlignmentMode: .center,
@ -68,7 +68,7 @@ class SettingsScene: SKScene {
) )
entityManager.add(Label(fontnamed: "Courier-Bold", entityManager.add(Label(fontnamed: "Courier-Bold",
name: "LabelMusic", name: "LabelMusic",
text: "Music", fontSize: 50.0, text: "Sounds", fontSize: 50.0,
fontColor: .black, fontColor: .black,
position: CGPoint(x: self.size.width * 0.5, y: self.size.height / 2 - 15), position: CGPoint(x: self.size.width * 0.5, y: self.size.height / 2 - 15),
horizontalAlignmentMode: .right, horizontalAlignmentMode: .right,
@ -78,7 +78,7 @@ class SettingsScene: SKScene {
) )
entityManager.add(Label(fontnamed: "Courier-Bold", entityManager.add(Label(fontnamed: "Courier-Bold",
name: "LabelBackground", name: "LabelBackground",
text: "Background", text: "Wind",
fontSize: 50.0, fontSize: 50.0,
fontColor: .black, fontColor: .black,
position: CGPoint(x: self.size.width * 0.5, y: self.size.height / 2 - 115), position: CGPoint(x: self.size.width * 0.5, y: self.size.height / 2 - 115),