mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-06 13:47:48 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="j9k-Zd-Qzd">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1280" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Launch View Controller-->
|
||||
<scene sceneID="HOS-tt-w20">
|
||||
<objects>
|
||||
<viewController id="j9k-Zd-Qzd" customClass="LaunchViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Pmp-0Z-jHt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="oRW-gl-5eV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
</view>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<outlet property="loadingImageView" destination="oRW-gl-5eV" id="f28-F3-8tz"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="hdu-SU-bMp" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-149" y="-247"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// LoadingGameController.h
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ben Tkacheff on 11/19/13.
|
||||
// Copyright (c) 2013 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RobloxPageViewController.h"
|
||||
|
||||
@interface LaunchViewController : RobloxPageViewController
|
||||
{
|
||||
}
|
||||
|
||||
@property (retain, nonatomic) IBOutlet UIImageView *loadingImageView;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// LoadingGameController.m
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ben Tkacheff on 11/19/13.
|
||||
// Copyright (c) 2013 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "LaunchViewController.h"
|
||||
#import "PlaceLauncher.h"
|
||||
#import "ObjectiveCUtilities.h"
|
||||
#include "v8datamodel/DataModel.h"
|
||||
|
||||
@interface LaunchViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation LaunchViewController
|
||||
|
||||
@synthesize loadingImageView;
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self)
|
||||
{
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id) initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (self)
|
||||
{
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
NSString* loadingImage = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RbxLoadingImage"];
|
||||
[loadingImageView setImage:[UIImage imageNamed:loadingImage]];
|
||||
}
|
||||
|
||||
-(void) gameLoaded
|
||||
{
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
[[PlaceLauncher sharedInstance] presentGameViewController];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void) startGame
|
||||
{
|
||||
NSNumber *placeId = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RbxPlaceId"];
|
||||
|
||||
[[PlaceLauncher sharedInstance] startGame:[placeId intValue] controller:self request:JOIN_GAME_REQUEST_PLACEID presentGameAutomatically:YES];
|
||||
|
||||
shared_ptr<RBX::Game> currentGame = [[PlaceLauncher sharedInstance] getCurrentGame];
|
||||
|
||||
if(currentGame->getDataModel()->getIsGameLoaded())
|
||||
[self gameLoaded];
|
||||
else
|
||||
currentGame->getDataModel()->gameLoadedSignal.connect(boostFuncFromSelector(@selector(gameLoaded),self));
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self startGame];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
@end
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Reference in New Issue
Block a user