delete commented Code and prints
This commit is contained in:
parent
f3036a5b33
commit
7b128a7ee8
@ -34,7 +34,6 @@ class Base : SKSpriteNode{
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
|
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||||
print("\(self.name!) was touched and is located at \(self.position)")
|
|
||||||
self.run(
|
self.run(
|
||||||
SKAction.sequence(
|
SKAction.sequence(
|
||||||
[
|
[
|
||||||
|
@ -57,24 +57,6 @@ class GameScene: SKScene, SKPhysicsContactDelegate {
|
|||||||
bases[5].physicsBody?.collisionBitMask = physicsBodyNumber.emptyNumber
|
bases[5].physicsBody?.collisionBitMask = physicsBodyNumber.emptyNumber
|
||||||
bases[5].physicsBody?.contactTestBitMask = physicsBodyNumber.basePlayer2Number
|
bases[5].physicsBody?.contactTestBitMask = physicsBodyNumber.basePlayer2Number
|
||||||
|
|
||||||
// Spawn bases
|
|
||||||
/*for _ in 1...15 {
|
|
||||||
let color = PlayerColors.colors.randomElement()
|
|
||||||
let xRange = Int(frame.minX + frame.width * 0.07)...Int(frame.maxX - frame.width * 0.07)
|
|
||||||
let yRange = Int(frame.minY + frame.height * 0.07)...Int(frame.maxY - frame.width * 0.07)
|
|
||||||
let position = CGPoint(
|
|
||||||
x: Int.random(in: xRange),
|
|
||||||
y: Int.random(in: yRange)
|
|
||||||
)
|
|
||||||
|
|
||||||
print("Generating Base at \(position)")
|
|
||||||
|
|
||||||
let base = Base(frame: frame, color: color!, position: position)
|
|
||||||
|
|
||||||
addChild(base.spriteNode)
|
|
||||||
bases.append(base)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createVirginBases() {
|
func createVirginBases() {
|
||||||
@ -192,7 +174,6 @@ class GameScene: SKScene, SKPhysicsContactDelegate {
|
|||||||
|
|
||||||
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
|
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||||
for touch in touches {
|
for touch in touches {
|
||||||
print("hit")
|
|
||||||
let locationUser = touch.location(in: self)
|
let locationUser = touch.location(in: self)
|
||||||
if atPoint(locationUser) == menu {
|
if atPoint(locationUser) == menu {
|
||||||
menu.removeFromParent()
|
menu.removeFromParent()
|
||||||
@ -202,7 +183,6 @@ class GameScene: SKScene, SKPhysicsContactDelegate {
|
|||||||
|
|
||||||
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
|
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
|
||||||
for touch in touches {
|
for touch in touches {
|
||||||
print("hit")
|
|
||||||
let locationUser = touch.location(in: self)
|
let locationUser = touch.location(in: self)
|
||||||
if atPoint(locationUser) == player[1]{
|
if atPoint(locationUser) == player[1]{
|
||||||
player[1].position = locationUser
|
player[1].position = locationUser
|
||||||
|
Loading…
Reference in New Issue
Block a user