ååã® ð€ ãããžã§ã¯ãã« Game Center ãã©ã°ã€ã³ãè¿œå ãã ã®èšäºã§ã¯ Godot å ¬åŒã® iOS ãã©ã°ã€ã³ã®ãã¡ Game Center ã®ãã©ã°ã€ã³ããããžã§ã¯ãã«è¿œå ããæé ã«ã€ããŠèª¬æãããããã©ãä»åã®èšäºã§ã¯ããã®è¿œå ãããã©ã°ã€ã³ã䜿ã£ãŠãå®éã« Apple ã® Game Center ã®æ©èœãå®è£ ããæ¹æ³ã«ã€ããŠæžããŠãã§ã
ãããã Game Center ã£ãŠäœïŒã£ãŠäººãããããããããã©ãååã®èšäºã®åé ã§è»œã説æããŠããããããã£ããå ã«ãã£ã¡èŠãŠã¿ãŠãªã
ãããŸãã«ã¯ã倧ãã次ã®2ã€ã®ã»ã¯ã·ã§ã³ã«åããŠèª¬æããŠããããšã«ãããã
- App Store Connect 㧠Game Center ã®èšå®ããã
- GDScript 㧠Game Center ã®å®è£ ããã
ã¡ãªã¿ã«ãGodot Docs / iOS plugins / iOSçšãã©ã°ã€ã³ ã«ãã©ã°ã€ã³ã®äœ¿ãæ¹ã®åºæ¬ã¯æžããŠããããããŸããããèŠãŠãããã®ãé åœãªæããããã
ããšãGame Center ãã©ã°ã€ã³ã®ã³ãŒãã«ã€ããŠã¯ GitHub ã®ã»ãã«ãã Godot iOS GameCenter plugin ã§ç¢ºèªã§ããããã现ãã確èªããã人ã¯ãã£ã¡ãèŠãŠã¿ãŠãå人çã«ã¯æåã¡ãã£ãšé£æ床é«ãããªãšæã£ããã©ãã
èšäºäœæåœæã®çè ã®ç°å¢
Godot ã®ããŒãžã§ã³: 4.2.1
ã³ã³ãã¥ãŒã¿ã®ã¢ãã«: MacBook Air M1, 2020
OS: macOS 14.4.1
Xcode ãã App Store Connect ã«ãã«ããã¢ããããŒããã
ãŸã倧åæãšããŠãGodot ãã Export ãããããžã§ã¯ãã Xcode ãã App Store Connect ã«ã¢ããããŒãããå¿ èŠããããããå ·äœçãªæé ã¯ãå¥ã®èšäº ð€ Xcode ãã App Store Connect ã«ã²ãŒã ãé åžãã ãåèã«ããŠã¿ãŠãªãXcode 㧠Game Center æ©èœãæå¹ã«ããæé ã説æããŠãã§ã
App Store Connect 㧠Game Center ã®èšå®ããã
ãŸã㯠App Store Connect ã«ã¢ã¯ã»ã¹ããŠãGame Center ãšé£æºããããã¢ããªãéžæãããããµã€ãããŒã® Game Center ãã Game Center ã®ç·šéç»é¢ãéããŠã¿ãããããããããã㧠Leaderboard ãš éæé ç® ãè¿œå ã§ããããªé°å²æ°æŒã£ãŠããããäžç®çç¶ããã
ã¡ãªã¿ã«ãäžã®ã¹ã¯ãªãŒã³ã·ã§ããã¯åããã§ã« Leaderboard ãš éæé
ç® ãè¿œå ããç¶æ
ã®ãã®ããããæåã¯ã©ã£ã¡ã空ã£ãœã«ãªã£ãŠãã§ã
Leaderboard ã®èšå®ããã
Leaderboard ã£ãŠããã®ã¯ãäžçäžã®åãã²ãŒã ã®ãã¬ã€ã€ãŒå士ãäœãããã®ã¹ã³ã¢ã Apple ã® Game Center ãéããŠç«¶ãåããæ©èœããããªããã® Leaderboard ã䜿ãããã£ããã次ã®æé ã§ãã£ããããã§ã
- ãŸã Leaderboard ã® (+) ãã¿ã³ãã¯ãªãã¯ããã
- åç
§å ãš Leaderboard ID ã決ãããã©ã£ã¡ãã©ã£ã¡ãããããªããªããããã«åãã«ããšããããããã
- æšæºLeaderboard ã åšæLeaderboard ã©ã£ã¡ã«ãããéžæãåè
ã¯ãã® Leaderboard ãåé€ãããŸã§æ°žé ã«ã¹ã³ã¢ãæ®ãã¿ã€ããåŸè
ã¯åšæçã«ãªã»ããããã¿ã€ããåšæã¯ããšã§èªåã§èšå®ããã§ã
- ã¹ã³ã¢ã®ãã©ãŒããããã¹ã³ã¢ç¯å²ãã¹ã³ã¢éä¿¡ã¿ã€ãã䞊ã³é ããããã決ããŠãäžçªããããããã®ã¯ããã©ãŒããããæŽæ°ã«ããŠãã¹ã³ã¢ç¯å²ãæå°å€ 0 ããäœè£æãããæ倧å€ã«ããããšãããã¹ã³ã¢ãé«ãæ¹ãè¯ããªãéé ã«ããŠé«ãã¹ã³ã¢ãäžã«ããããã«ããã°ãããã
ãããªæãã§ãå¿
èŠãªåã ãè¿œå ããŠããã ããç°¡åãããäŸãã°ãæçã¯ãªã¢æéãšãåããæµã®æ°ãšããä»ã®ãã¬ã€ã€ãŒãšç«¶ããããªããããªã¹ã³ã¢ãèšå®ããŠããããšããã¬ã€ã€ãŒãã¢ãããŒã·ã§ã³ããããšæããããããããèããŠæãã€ããŸãŸã«è¿œå ããŠã£ãŠããããšæãããé çªã¯ãã€ã§ãèªç±ã«å€æŽã§ãããããã
éæé ç®ã®èšå®ããã
éæé ç® ã£ãŠããã®ã¯ãã²ãŒã ããã¬ã€ããŠããäžã§ãäœãããã®ç®æšãèšå®ããŠããããéæã§ããããšã蚌æããæ©èœããããäŸãã°ãã²ãŒã ãã¯ãªã¢ãããšããæçµãŽãŒã«ã«å¯ŸããŠãäžãã¹ãåãããšã«éæé ç®ãçšæãããããã£ã©ã¯ã¿ãŒã®æé·ã«åãããŠéæé ç®ãçšæãããããŠããã€ã«ã¹ããŒã³ã眮ããŠããããšãæåŸãŸã§ã²ãŒã ããã¬ã€ããŠãããã®ã«åœ¹ç«ã£ãããããããããšã¯ãã¢ã€ãã åéã«é¢ããéæé ç®ãšããåããæµã®æ°ãªããã®éæé ç®ãšãã®ãã蟌ã¿èŠçŽ ãè¿œå ãããšãã²ãŒã ãããé·ãæ·±ã楜ããã§ããããããããããã
éæé ç®ãè¿œå ããããšãã¯ã次ã®æé ã«æ²¿ã£ãŠãã£ãŠã¿ãŠãªã
- ãŸã㯠éæé
ç® ã® (+) ãã¿ã³ãã¯ãªãã¯ããã
- éããããã«ã§ åç
§å ãš éæé
ç®ID ãå
¥åããŠãã äœæ ãã¿ã³ãã¯ãªãã¯ããŠãªããããã©ã£ã¡ãã©ã£ã¡ãããããããã«ãªããšæã人ã¯åãã«ããšãããããããšã¡ããããªã
ð¡ ãã§ã«äœææžã¿ã®éæé ç®ããã®åç §åã®ãªã³ã¯èžãã ã次ã®ç·šéç»é¢ã«ãããã§ã - ç·šéç»é¢ãéãããããŸãã¯ãç¹æ°ããé衚瀺ããè€æ°åéæå¯èœããé çªã«èšå®ããŠãããŠãªãèšå®é
ç®ã®æå³ããããããšã㯠(?) ãã¿ã³ãã¯ãªãã¯ããŠã¿ããããããè€æ°ã®éæé
ç®ãäœãäºå®ãã£ãããç¹æ°ã¯åèš1,000ç¹ãåé
ããªããããããå²ãç®ããŠããŸãããšå²ãæ¯ã£ãŠãã
- ã€ã¥ããŠãããŒã«ãªãŒãŒã·ã§ã³ãè¿œå ãã¿ã³ãæŒããŠãã²ãŒã ã«å¯Ÿå¿ããèšèªããšã®èšå®ãããŠããã§ã
ð¡ ãã§ã«äžã€ä»¥äžããŒã«ãªãŒãŒã·ã§ã³ãè¿œå æžã¿ã®å Žåã¯ããã£ã¡ã® (+) ãã¿ã³ã§è¿œå ããŠãªã - ãããªæãã§åå
¥åæ¬ãåããŠãããšã¯ãã£ããããããã®éæé
ç®ã®ããã®ã€ã¡ãŒãžãã¢ããããŒãããšããã€ã¡ãŒãžãªãã§ãããããã©ãããã¯ãããã«çŽ ã£æ°ãªãããïŒãã ããã¢ããããŒãããã€ã¡ãŒãžã«ã¯å¶éããã£ãŠã以äžã®ããã«æžããŠãããããç»åãçšæãããšãã¯æ³šæããŠãªã
ãéæé ç®ãè¡šãããŒã«ã©ã€ãºãããç»åãç»åã¯ã1024x1024ãã¯ã»ã«ã72dip以äžãããã³RGBè²ç©ºéã®.jpegã.jpgããŸãã¯.pngãã¡ã€ã«ã§ããã²ã€ããããããŸããã
èšèªããšã«ç°ãªãã€ã¡ãŒãžãçšæããå¿ èŠã¯ãªãããããããŸã§éæé ç®ã«å¯ŸããŠäžã€ã€ã¡ãŒãžãçšæã§ãããããæãããã - ããŒã«ãªãŒãŒã·ã§ã³ãè¿œå ã§ããããããªæãã«ãªãã§ã
éæé ç®ãšããŠãããããªã®ã¯ãäŸãã°ãã¯ãªã¢åæ°ããããã¬ã€æéãããå ¥æããã¬ã¢ã¢ã€ãã ããã解æŸããã¹ãã«ããšãããªãè²ã èããŠè¿œå ããŠã¿ãŠãªããã ãå ã«éæé ç®ãå šéšæŽãåºããŠãç¹æ°ã®å²ãæ¯ãã決ããŠããäœæ¥ããã»ãããããšå人çã«ã¯æããããªãã§ãã£ãŠãããšãããšããéæé ç®ãè¿œå ãããšãªããšãç¹æ°ãå²ãæ¯ãçŽããªãããããããã£ããããã©ãããã®ãã
Game Center ãã©ã°ã€ã³ã䜿ã£ãŠã³ãŒãã£ã³ã°ãã
ã»ãªããããã㯠GDscript 㧠Game Center æ©èœãã³ãŒãã£ã³ã°ãããšã説æããŠããã§ã
ãŸãã¯ãããžã§ã¯ãã®äžã«ãgame_center.gd ãšãããã£ãœãååã§äžã€ã¹ã¯ãªããã€ãããããã¡ã€ã«ã·ã¹ãã ããã¯ã§å³ã¯ãªãã¯ããè¿œå ã§ããã§ã
ã²ãŒã ãå§ãŸããããªããã®ã¹ã¯ãªãããèªã¿èŸŒãããã«ãããããªãããããããšãã¯ãGodot ã® Project > Project Settings… > Autoload ã¿ããéããŠãäœã£ãã¹ã¯ãªãããè¿œå ãããããããã§ãããã§ã²ãŒã éå§ããã¿ã€ãã³ã°ã§ãã®ã¹ã¯ãªãããèªã¿èŸŒãŸãããã
次ã¯èå¿ã®ã¹ã¯ãªããã®äžèº«ããªãgame_center.gd ã¹ã¯ãªããã« Game Center ã®ããã°ã©ã ãå®è£
ããŠããããããã©ãæåã¯ãããªæã㧠Game Center ãã©ã°ã€ã³ãå
¥ããããã®å€æ°ããäŸãã° game_center
ã£ãŠååã«ããŠãå
ã«å®£èšããšããã
extends Node
# Game Center plugin
var game_center = null
ã€ãã« _ready()
é¢æ°ã®äžã«ãã²ãŒã éå§çŽåŸããå®è¡ããŠãããããã©ã°ã€ã³ã®ååŸãšèªèšŒã®éšåãè¿œå ããŠããããã³ãŒãã¯æ¬¡ã®ãããªæããã§ã
func _ready():
if OS.get_name() == "iOS":
if Engine.has_singleton("GameCenter"):
print("Found GameCenter plugin")
game_center = Engine.get_singleton("GameCenter")
var res = game_center.authenticate()
print("Authentication: ", res)
else:
print("There is no GameCenter game_center")
- ãŸããOS ã iOS ãã©ãããå€å®ããã®ã«
OS.get_name()
㧠OS ã®ååãååŸããŠãã§ãã¯ããŠããã - OS ã iOS ãã£ãããã€ãã¯
Engine.has_singleton("GameCenter")
㧠GameCenter ãã©ã°ã€ã³ããã¡ãããšãããã©ããããã§ãã¯ããŠãã§ã - ã»ãã§ããã©ã°ã€ã³ãã¿ã€ãã£ããã
Engine.get_singleton("GameCenter")
㧠Game Center ãã©ã°ã€ã³ãååŸããŠããããå€æ°game_center
ã«ã¶ã£èŸŒããšãããããã - ãã®ããšãã®ãŸãŸèªèšŒãŸã§ãã£ãŠããããã©ãèªèšŒã¯ Game Center ãã©ã°ã€ã³ã«åãä»ãã®
authenticate()
é¢æ°åŒã³åºãã ãã§ããããç°¡åããããã®é¢æ°ãèªèšŒã®çµæãè¿ããŠãããããres
å€æ°ã«çµæå ¥ããŠãprint()
ã§åºåããããããã°ããããããšã¡ããããªã
ãããŸã§ã Game Center æ©èœãå®è£ ããäžã§ã®äžæºåãããã€ãã¯ãGame Center ã® Leaderboard ãš Achievements ã®æ©èœã®å®è£ ã«ã€ããŠãããããé çªã«èª¬æããŠããã§ã
Leaderboard ãå®è£ ãã
Leaderboard ãããããŸãããããã£ã¡ãã·ã³ãã«ãªäŸã§èª¬æããŠããã§ã
æåã« Leaderboard ãæŽæ°ããããã®é¢æ°ãå®çŸ©ããã§ãããã§ã¯ update_leaderboard()
ã£ãŠããé¢æ°ã«ããšããã
func update_leaderboard(score:int, category:String):
print("call update_leaderboard()")
if not game_center:
print("No Game Center plugin")
return
if not game_center.is_authenticated():
print("not authenticated, authenticating again")
game_center.authenticate()
var data = {"score": score, "category": category}
print("New Leaderboard data: ", data)
var res = game_center.post_score(data)
print("Update Leaderboard response: " + str(res))
- é¢æ°ã®åŒæ°ã¯ã
score:int
ãšcategory:String
ã®2ã€èšå®ããŠãã§ã - ãŸã
game_center
å€æ°ã空ã£ãœã®null
ãã£ããé¢æ°ã¯ããã§çµäºãããã - ã€ãã«ãèªèšŒãã§ããŠãªãã£ãå Žåã¯ããäžåèªèšŒãããã§ãåºæ¬çã«ã¯
_ready()
å®è¡æã«èªèšŒå®äºããŠãã¯ãããã©ãã data
å€æ°ã«ãèŸæžåã®ããŒã¿ãä»£å ¥ããã§ããã®èŸæžåããŒã¿ã¯"score"
ãš"category"
ãšãã2ã€ã®ããŒããã£ãŠããããã©ã"category"
ã«ã¯ App Store Connect ã§èªåãçšæãã Leaderboard ã®ååã String åã§æå®ãããããã»ãã§ã"score"
ã®ã»ãã« int åã§å®éã®ã¹ã³ã¢ãå ¥ããŠãããããããããã§ãã©ã® Leaderboard ã«ã©ãã ãã®ã¹ã³ã¢ãåæ ããã®ããã£ãŠããã®ãæ瀺ããããŒã¿ãã§ããããããããã¡ãªã¿ã«ããã®ããŒã¿ã®åœ¢åŒã¯ããã®ããšç»å Žãã Game Center ãã©ã°ã€ã³ã«åãä»ãã®post_score()
é¢æ°ã®åŒæ°ã«æž¡ãããŒã¿ãšããŠæ±ºããããŠããã®ããããé©åœã«ã¯ã§ããžããšããªããã- ãããŠããã©ã°ã€ã³ã®
post_score()
ã®åŒæ°ã«data
å€æ°ãæž¡ããŠåŒã³åºãããããã㧠Leaderboard ã®ã¹ã³ã¢ãæŽæ°ããŠãããããæŽæ°ã®çµæãæ»ãå€ã§åºããŠãããããããããprint()
ã§åºåããŠãããã°ã§ããããã«ãããšãããšæããã
é¢æ° update_leaderboard()
ãå®çŸ©ã§ããã®ã§ãããšã¯å®éã«ã²ãŒã ã®äžã§ã¹ã³ã¢ãåæ ããã¿ã€ãã³ã°ã§ããã®é¢æ°ãåŒã³åºãã°ãããã
var current_score : int = 0
var highscore : int = 0
func update_highscore(current_score: int):
if high_score < current_score:
high_score = current_score
update_leaderboard(high_score, "highscore")
äŸãã°ãç°¡åãªã·ã¥ãŒãã£ã³ã°ã²ãŒã ã§èããŠã¿ãã
- å€æ°
current_score
ã宣èšããšããŠãæµãæã¡èœãšããããã®å€ãã©ãã©ãå ç®ãããŠããããšã«ãããã - ããã²ãšã€
highscore
ã£ãŠå€æ°ã宣èšããšããŠããã£ã¡ã¯ãéå»æé«èšé²ãä¿åããå€æ°ã§ãLeaderboard ã«åæ ãããã€ãã§ã - ããšã¯
update_highscore
ã£ãŠé¢æ°ã§ä»¥äžã®ããžãã¯ããŸãšããšããŠãã²ãŒã ãªãŒããŒã®ã¿ã€ãã³ã°ã§ãã®é¢æ°ãåŒã³åºãããããŸãããšããããšã¡ããããªãhighscore
å€æ°ã®å€ãcurrent_score
å€æ°ã®å€ãšæ¯èŒcurrent_score
ã®ã»ãã倧ããã£ããhighscore
ãæŽæ°ãã- ã€ãã§ã« Game Center ã® Leaderboard ãæŽæ°ãã
ãã®ãžãã¯ããã²ãŒã ã«ãã£ãŠå šç¶å€ãã£ãŠããããåèªã§é 匵ããã
ããšã¯ãã²ãŒã å 㧠Game Center ã®ç»é¢ã«ç§»åããŠãLeaderboard ã確èªããããããèªåã¯äœäœãªã®ããé äœã¯å€ãã£ãŠãã®ãããããã誰ãéãã§ãããŠãã®ããã£ãŠæ°ã«ãªããããããã®ããã®é¢æ°ã¯äŸãã°ã€ãã®ããã«ãããããããªã
func show_leaderboard():
if not game_center:
print("No Game Center plugin")
return
if not game_center.is_authenticated():
print("not authenticated, authenticating again")
game_center.authenticate()
var param := {"view": "leaderboards", "leaderboard_name": "highscore"}
var res = game_center.show_game_center(param)
print("Show Leaderboard response: ", res)
Button ããŒããæŒãããšãã«äžã®ãããªé¢æ°ãåŒã³åºããŠãGame Center ã® Leaderboard ç»é¢ã«é·ç§»ãããããããããããšã¡ããããªã
- é¢æ°ã®ååã¯
show_leaderboard()
ãåŒæ°ã¯ãªã game_center
å€æ°ã空ã£ãœã®null
ãã£ããé¢æ°ã¯ããã§çµäºãããã- èªèšŒãã§ããŠãªãã£ãå Žåã¯ããäžåèªèšŒãããã§ãåºæ¬çã«ã¯
_ready()
å®è¡æã«èªèšŒå®äºããŠãã¯ãã param
å€æ°ã«èŸæžåããŒã¿ãå ¥ãããããã¯ãã©ã°ã€ã³åãä»ãã®show_game_center()
é¢æ°ã®åŒæ°ã§æå®ã®åœ¢åŒã"view"
ããŒã«ã¯"leaderboards"
(è€æ°åœ¢ïŒ)ãã"leaderboard_name"
ããŒã«ã¯"highscore"
ïŒApp Store Connect ã§èšå®ããååïŒãããããå€ãšããŠæå®ããŠãªãparam
å€æ°ãåŒæ°ã«æž¡ãã€ã€ããã©ã°ã€ã³ã®show_game_center()
é¢æ°ãåŒã³åºããæ»ãå€ã§çµæãããããããé¢æ°ãå€æ°res
ã«å ¥ããŠããã®ããšãããã°çšãšããŠprint()
ã§åºåããããã«ããŠããã
éæé ç®ãå®è£ ãã
ã€ãã« éæé ç® ã«é¢ããããã°ã©ã ãã³ãŒãã£ã³ã°ããŠããã§ããšãã£ãŠã Leaderboard ã®ã»ãã§èŠé ã€ãããŠãã䌌ããããªãããããå®å¿ããŠãªããã¡ããã·ã³ãã«ãªäŸã§ãããã
func update_achievement(item_name:String, progress:float):
print("called report_achievement()")
if not game_center:
print("No Game Center plugin")
return
if not game_center.is_authenticated():
print("not authenticated, authenticating again")
game_center.authenticate()
var data = {"name": item_name, "progress": progress}
print("New Achievement data: ", data)
var res = game_center.award_achievement(data)
print("Update Achievement response: " + str(res))
- é¢æ°ã¯ãäŸãã°
update_achievement()
ãšããååã§ãåŒæ°ã¯ãitem_name:String
ãšprogress:float
ã®2ã€èšå®ããŠå®çŸ©ããã§ã - ãŸã
game_center
å€æ°ã空ã£ãœã®null
ãã£ããé¢æ°ã¯ããã§çµäºãããã - ã€ãã«ãèªèšŒãã§ããŠãªãã£ãå Žåã¯ããäžåèªèšŒãããã§ãåºæ¬çã«ã¯
_ready()
å®è¡æã«èªèšŒå®äºããŠãã¯ãããã data
å€æ°ã«ãèŸæžåã®ããŒã¿ãä»£å ¥ããã§ããã®èŸæžåããŒã¿ã¯"name"
ãš"progress"
ãšãã2ã€ã®ããŒããã£ãŠããããã©ã"name"
ã«ã¯ App Store Connect ã§èªåãçšæããéæé ç®ã®ååã String åã§æå®ãããããã»ãã§ã"progress"
ã®ã»ãã« float åã§ãã®éæé ç®ã«ã€ããŠã®éæçïŒåäœã¯ %ïŒãæž¡ããŠããããšãããã§ãã©ã®éæé ç®ã®æ¡ä»¶ãã©ããããéæã§ããŠããã®ãããæ瀺ããããŒã¿ãã§ãããããããªãã¡ãªã¿ã«ããã®èŸæžåã®ããŒã¿åœ¢åŒã¯ãGame Center ãã©ã°ã€ã³ã«åãä»ãã®award_achievement()
é¢æ°ã®åŒæ°ã«æž¡ãããŒã¿ãšããŠæ±ºããããŠããã®ããããé©åœã«ãã£ãããããã®ããã- ãããŠããã©ã°ã€ã³ã®
award_achievement()
ãåŒæ°ã«data
å€æ°ãæž¡ããŠåŒã³åºããããããã§æå®ããéæé ç®ã®éæçãæŽæ°ããŠãããããæŽæ°ã®çµæãæ»ãå€ã§åºããŠãããããããããprint()
ã§åºåããŠãããã°ã§ããããã«ãããšãããšæããã
ã€ã¥ããŠãå®éã«éæé ç®ã®éæçãæŽæ°ããéšåã®ã³ãŒããèŠãŠã¿ããã
var play_count := 0
var play_count_100 := false
func update_play_count_100():
if not play_count_100:
var progress = play_count / 100 * 100.0
update_achievement("play_count_100", progress)
if progress == 100.0:
play_count_100 = true
- äŸãã°ã100åãã¬ã€ãããéæãšããæ¡ä»¶ã®éæé ç®ããã£ããšããããã
- ããã«å¯ŸããŠããã¬ã€ãããã³ã«ã€ã³ã¯ãªã¡ã³ããããå€æ°
play_count: int
ã宣èšããšãããã - ãããŠãéæé
ç®ãã¯ãªã¢æžã¿ãã©ããã瀺ãå€æ°
play_count_100: bool
ãå¿ èŠããã宣èšããšããªã - ããã§
update_play_count_100()
é¢æ°ãå®çŸ©ããããããã¬ã€ãå§ãŸããã³ã«ãã®é¢æ°ãåŒã³åºãã°ãéæé ç®ã®éæçãåŸã ã«äžãã£ãŠãã£ãŠãæçµçã« 100 % ã«ãªãã£ãŠããããããã®é¢æ°ã®äžã«ã¯ä»¥äžã®å 容ãèšè¿°ããŠãªã- ã§ã
if
æã䜿ã£ãŠplay_count_100
ãfalse
ïŒæªéæïŒã®å Žåã ãåŠçããããã«æ¡ä»¶åå²ãããŠã - å€æ°
progress
ã«ãåæ¯ã 100ãçŸåšã®play_count
ãååã«ããŠãåäœ % ã«åãã㊠100 æãããã®ãä»£å ¥ããã§ããããçŸåšã®éæçã«ãªããã - ããšã¯ããã£ãäœã£ãé¢æ°
update_achievement()
ããåŒæ°ã«"play_count_100"
ãšprogress
æž¡ãã€ã€åŒã³åºããããããã§ãGame Center ã®æå®ããéæé ç®ãæŽæ°ããããã - ããšã¯ã
progress
ã 100 ãã£ãããä»åŸã¯èšæž¬ããå¿ èŠããªãã®ã§play_count_100
ã¯true
ã«æŽæ°ããšããªã
- ã§ã
éæé ç®ã®å®è£ ã«ã€ããŠã¯ãããããã«ããšããã
ãããã«
ãšããããšã§ãä»å㯠iOS çšã®ã²ãŒã 㧠Game Center æ©èœãå®è£ ããæ¹æ³ã«ã€ããŠçŽ¹ä»ããã§ãå®ã¯ãGodot å ¬åŒã® iOS ãã©ã°ã€ã³ã®ãªããžããªã«ãã Readme ã«ã©ããã£ãŠå®è£ ããã®ã説æã¯ãããããã©ã説æãã¡ãã£ãšå°ãªããã£ããããã©ã°ã€ã³ã®ã³ãŒããã¡ãã£ãšé£è§£ãã£ããã§ãå人çã«ãæ³å®ããŠãããå®è£ ã«æéãããã£ããããããããããã§ããã®èšäºãè£è¶³è³æãšããŠåœ¹ç«ãŠãŠãããããå¬ããéãã§ãã
ã²ãŒã ã®å®£äŒ
æåŸã«ãå®éã« Game Center ãã©ã°ã€ã³ã䜿ã£ãŠããåã®ã²ãŒã ã®å®£äŒã ããããŠãªã
ð¹ ãã®åãäŸ
ä»ããªãã®åäœèŠåãšåå°ç¥çµãè©ŠãããïŒäŸãæäœããŠã空ããéã£ãŠãããããªç©ããããªç©ãèŠäºç©ºäžã§åãããšãã§ãããïŒïŒç°¡åçææäœã§ãã¬ã€ã§ãããæ¿ãããå¿ è³ã®çœå¿«ã«ãžã¥ã¢ã«ã»ã¿ã€ãã³ã°ã²ãŒã ïŒ
ð ã¹ãããªãœãªãã£ã¢
ããœãªãã£ã¢ïŒã¯ãã³ãã€ã¯ïŒããšèšãã°ãèšãããšç¥ããå®çªäžã®å®çªãäžäººéã³ã«ãŒãã²ãŒã ã®çæ§ãªããã§ããããã®ãã³ãã¢ãã€ã«ã²ãŒã ãã¹ãããªãœãªãã£ã¢ãã App Store ã§é ä¿¡äžïŒ
â£ïž ã¯ã€ãã¯ãã³ãããŒã«ãŒ
ã«ãžãã§äººæ°ã®å®çªã«ãŒãã²ãŒã ãšèšãã°ãããŒã«ãŒã§ãããã¢ãã€ã«ã«ãžã¥ã¢ã«ã²ãŒã ãã¯ã€ãã¯ãã³ãããŒã«ãŒããšããŠãããºã«ã²ãŒã ã«ãªããŸãããæäœã¯ç°¡åãã§ããã ãçŽ æ©ãã«ãŒããã¿ããããããããããŒã«ãŒã®åœ¹ãæããã ãïŒApp Store ã§é ä¿¡äžïŒ