add Animated Cylinder to MainScence
This commit is contained in:
parent
df16ceeb7c
commit
24eced5859
@ -581,8 +581,8 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = GoldWars/GoldWars.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = DDKFQG46BQ;
|
||||
INFOPLIST_FILE = GoldWars/Info.plist;
|
||||
@ -593,7 +593,7 @@
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.hft.stuttgart.ip2.goldwars;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Developer Profile";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 2;
|
||||
};
|
||||
@ -604,8 +604,8 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = GoldWars/GoldWars.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = DDKFQG46BQ;
|
||||
INFOPLIST_FILE = GoldWars/Info.plist;
|
||||
@ -616,7 +616,7 @@
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = de.hft.stuttgart.ip2.goldwars;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Developer Profile";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 2;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import SpriteKit
|
||||
|
||||
import SceneKit
|
||||
class MenuScene: SKScene {
|
||||
|
||||
var entityManager: EntityManager!
|
||||
@ -36,6 +36,24 @@ class MenuScene: SKScene {
|
||||
self.loadScene(scene: SettingsScene(size: self.size))
|
||||
}))
|
||||
entityManager.add(Background(size: self.size))
|
||||
|
||||
let scnScene: SCNScene = {
|
||||
let scnScene = SCNScene()
|
||||
let cylinder = SCNCylinder(radius: 120, height: 30)
|
||||
let cylinderNode = SCNNode(geometry: cylinder)
|
||||
cylinderNode.eulerAngles = SCNVector3(x: Float(CGFloat.pi / 2), y: 0, z: Float(CGFloat.pi / 2))
|
||||
let action = SCNAction.rotateBy(x: CGFloat(GLKMathDegreesToRadians(360)), y:0 , z: 0, duration: 8)
|
||||
let forever = SCNAction.repeatForever(action)
|
||||
cylinderNode.runAction(forever)
|
||||
scnScene.rootNode.addChildNode(cylinderNode)
|
||||
return scnScene
|
||||
}()
|
||||
|
||||
let node = SK3DNode(viewportSize: CGSize(width: 300, height: 300))
|
||||
node.scnScene = scnScene
|
||||
node.position = CGPoint(x: midX, y: midY + 200)
|
||||
|
||||
self.addChild(node)
|
||||
|
||||
if SoundManager.sharedInstance.isMusicPlaying == false && SoundManager.sharedInstance.isMusicEnabled == true {
|
||||
SoundManager.sharedInstance.startMenuMusic()
|
||||
|
Loading…
Reference in New Issue
Block a user