software-projekt-2-gold-wars/GoldWars/GoldWars/Components/DefaultBaseComponent.swift

25 lines
531 B
Swift

//
// DefaultBaseComponent.swift
// GoldWars
//
// Created by Niko Jochim on 01.05.20.
// Copyright © 2020 SP2. All rights reserved.
//
import GameplayKit
import SpriteKit
class DefaultBaseComponent: GKComponent {
var spriteNode: BaseNode
init(texture: SKTexture, position: CGPoint) {
spriteNode = BaseNode(texture: texture, size: CGSize(width: 80, height: 80))
spriteNode.position = position
super.init()
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}