9e501cc4e8
Complete implementation of a 2D top-down arcade collector game where players control a rolling suitcase through an airport, collecting good dogs and green people while avoiding bad dogs and gray people. Features: - Touch & drag controls for suitcase movement - Automatic scrolling airport floor with tile pattern - 4 entity types: good dogs (small/big), bad dogs, green/gray humans - Spawn system with configurable distribution rates - Collision detection with visual feedback effects - Score tracking with high score persistence - 90-second time limit with 10 dogs + 5 humans goal - 3 lives system with invincibility frames - Menu, Game, GameOver, and Victory scenes - German UI text (Created by Ingo K.) Technical: - iOS 15+ with SpriteKit framework - Modular architecture with Nodes, Managers, Scenes - Physics-based collision detection - UserDefaults for score persistence
43 lines
1.1 KiB
Swift
43 lines
1.1 KiB
Swift
//
|
|
// AppDelegate.swift
|
|
// RollkofferSimulator
|
|
//
|
|
// Created by Ingo K.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
@main
|
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
|
|
var window: UIWindow?
|
|
|
|
func application(_ application: UIApplication,
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
return true
|
|
}
|
|
|
|
func applicationWillResignActive(_ application: UIApplication) {
|
|
// Pause the game when app goes to background
|
|
NotificationCenter.default.post(name: .pauseGame, object: nil)
|
|
}
|
|
|
|
func applicationDidEnterBackground(_ application: UIApplication) {
|
|
// Save game state if needed
|
|
}
|
|
|
|
func applicationWillEnterForeground(_ application: UIApplication) {
|
|
// Restore game state if needed
|
|
}
|
|
|
|
func applicationDidBecomeActive(_ application: UIApplication) {
|
|
// Resume game if needed
|
|
}
|
|
}
|
|
|
|
// MARK: - Notification Names
|
|
extension Notification.Name {
|
|
static let pauseGame = Notification.Name("pauseGame")
|
|
static let resumeGame = Notification.Name("resumeGame")
|
|
}
|