2016-05-20 11 views
0

Ich habe ein Spiel mit Corona im Hochformat gemacht. Alles ist großartig, aber die Konfiguration ist nicht für alle verschiedenen Bildschirmgrößen anpassbar. Dies ist mein Code:config.lua für Bildschirmgrößen (iOS, Android)

local aspectRatio = display.pixelHeight/display.pixelWidth 

application = { 
    content = { 
     width = aspectRatio > 1.5 and 320 or math.floor(480/aspectRatio), 
     height = aspectRatio < 1.5 and 480 or math.floor(320 * aspectRatio), 
     scale = "letterBox", 
     fps = 60, 

     imageSuffix = { 
     ["@2x"] = 1.5, 
     ["@4x"] = 3.0, 
     }, 
    }, 
} 

zum Beispiel: alle iPhone-Modelle sind mit diesem Code in Ordnung, aber nicht für die iPhone 4. (Elemente des Spiels sind über Bildschirm). Gibt es irgendeinen "universellen" Code oder?

Ich hoffe, dass mir jemand helfen kann.

Dank und freundliche Grüße

Antwort

Verwandte Themen