create new finish Button

This commit is contained in:
Niko Jochim 2020-06-26 01:02:09 +02:00
parent 0cf368fef0
commit 6607d6739b
9 changed files with 51 additions and 7 deletions

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "finish_button 2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,7 +1,7 @@
{ {
"images" : [ "images" : [
{ {
"filename" : "gold_button_3.png", "filename" : "gold_button_4.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "1x" "scale" : "1x"
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "gold_button_4.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -20,6 +20,8 @@ class SkillButtonNode: ButtonNode {
self.cooldown = cooldown self.cooldown = cooldown
self.displayText = text self.displayText = text
super.init(textureName: textureName, text: text, isEnabled: isEnabled, position: position, onButtonPress: onButtonPress) super.init(textureName: textureName, text: text, isEnabled: isEnabled, position: position, onButtonPress: onButtonPress)
self.size = CGSize(width: 100, height: 100)
self.label.fontSize = 25
} }

View File

@ -98,16 +98,16 @@ class HUD: GKEntity {
) )
finishButton = SingeClickButtonNode( finishButton = SingeClickButtonNode(
textureName: "yellow_button04", textureName: "finish_button",
text: "Fertig", text: "",
isEnabled: true, isEnabled: true,
position: CGPoint( position: CGPoint(
x: EntityManager.gameEMInstance.scene.size.width * 0.17, x: EntityManager.gameEMInstance.scene.size.width / 2 ,
y: EntityManager.gameEMInstance.scene.size.height * 0.09), y: EntityManager.gameEMInstance.scene.size.height * 0.1),
onButtonPress: { } onButtonPress: { }
) )
finishButton.size = CGSize(width: 125, height: 40) finishButton.size = CGSize(width: 100, height: 100)
finishButton.setScale(0.9) //finishButton.setScale(0.9)
finishButton.zPosition = 2 finishButton.zPosition = 2
backgroundRoundCounter = SKSpriteNode(texture: SKTexture(imageNamed: "roundInfo_texture")) backgroundRoundCounter = SKSpriteNode(texture: SKTexture(imageNamed: "roundInfo_texture"))