He travel to other place and eat a lot and a lot of food to become bigger.
Do you want to see this travel or join with him in the journal become prime sheep?
Download: Link
![]() |
| The craveman not the caveman |
![]() |
| Game Project with Sprite Kit |
![]() |
| Dark Knight Atlas |
private var knight = SKSpriteNode()
private var knightWalkingFrames: [SKTexture] = []
private var knightIdleFrames: [SKTexture] = []
func buildKnight() {
let knightAnimatedAtlas = SKTextureAtlas(named: "DarkKnight")
// Walking Frames
var walkingFrames: [SKTexture] = []
for i in 0...23 {
let knightTextureName = String(format: "Walking_%03d", arguments: [i])
walkingFrames.append(knightAnimatedAtlas.textureNamed(knightTextureName))
}
knightWalkingFrames = walkingFrames
// Idle Frames
var idleFrames: [SKTexture] = []
for i in 0...17 {
let knightTextureName = String(format: "Idle_%03d", arguments: [i])
idleFrames.append(knightAnimatedAtlas.textureNamed(knightTextureName))
}
knightIdleFrames = idleFrames
}
func animatedKnight() {
knight.run(SKAction.repeatForever(SKAction.animate(with: knightWalkingFrames, timePerFrame: 0.03, resize: false, restore: true)), withKey: "walkingInPlaceKnight")
}
func knightStand() {
knight.removeAllActions()
knight.run(SKAction.repeatForever(SKAction.animate(with: knightIdleFrames, timePerFrame: 0.03, resize: false, restore: true)), withKey: "idleInPlaceKnight")
}
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
for t in touches { self.touchUp(atPoint: t.location(in: self)) }
let touch = touches.first!
let location = touch.location(in: self)
moveKnight(location: location)
}
func moveKnight(location: CGPoint) {
if knight.action(forKey: "idleInPlaceKnight") != nil {
knight.removeAction(forKey: "idleInPlaceKnight")
}
var multiplierForDirection: CGFloat
let knightSpeed = frame.size.width / 3.0
let moveDifference = CGPoint(x: location.x - knight.position.x, y: location.y - knight.position.y)
let distanceToMove = sqrt(moveDifference.x * moveDifference.x + moveDifference.y * moveDifference.y)
let moveDuration = distanceToMove / knightSpeed
if moveDifference.x < 0 {
multiplierForDirection = -1.0
} else {
multiplierForDirection = 1.0
}
knight.xScale = abs(knight.xScale) * multiplierForDirection
if knight.action(forKey: "walkingInPlaceKnight") == nil {
animatedKnight()
}
let moveAction = SKAction.move(to: location, duration: (TimeInterval(moveDuration)))
let doneAction = SKAction.run( {
[weak self] in self?.knightStand()
})
let moveActionWithDone = SKAction.sequence([moveAction, doneAction])
knight.run(moveActionWithDone, withKey: "knightMoving")
}