2016-01-13 54 views
-7

我想將我的遊戲從Android(Java)移植到IOS。我正在使用谷歌的實時多人遊戲服務。他們在他們的網站上提供示例應用程序。哪種編程語言的語法是這樣的(Swift或Objective C)

這是哪種編程語言? Swift還是Objective C?代碼google developers

短摘自鏈接:

- (void)room:(GPGRealTimeRoom *)room didChangeStatus:(GPGRealTimeRoomStatus)status { 
if (status == GPGRealTimeRoomStatusDeleted) { 
    NSLog(@"RoomStatusDeleted"); 
    [self.lobbyDelegate multiPlayerGameWasCanceled]; 
    _roomToTrack = nil; 
} else if (status == GPGRealTimeRoomStatusConnecting) { 
    NSLog(@"RoomStatusConnecting"); 
} else if (status == GPGRealTimeRoomStatusActive) { 
    NSLog(@"RoomStatusActive! Game is ready to go"); 
    _roomToTrack = room; 

    // We may have a view controller up on screen if we're using the 
    // invite UI 
    [self.lobbyDelegate readyToStartMultiPlayerGame]; 
} else if (status == GPGRealTimeRoomStatusAutoMatching) { 
    NSLog(@"RoomStatusAutoMatching! Waiting for auto-matching to take place"); 
    _roomToTrack = room; 
} else if (status == GPGRealTimeRoomStatusInviting) { 
    NSLog(@"RoomStatusInviting! Waiting for invites to get accepted"); 
} else { 
    NSLog(@"Unknown room status %ld", status); 
} 
} 

提前感謝!

+5

Objective-C它是!順便說一句,不是一個適當的地方問這個問題。 –

回答

1

這是Objective-C。

In objective-c []用於消息傳遞(方法調用)。

在swift語法用於消息傳遞(方法調用)。