This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CoreLocation | |
class Geospatial: NSObject { | |
//JSON 全体の構成 | |
struct Json: Codable { | |
let elevation: Double | |
let hsrc: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//表示している地図の中心の緯度経度 | |
public static func centerCoordinate(mapView: GMSMapView) -> CLLocationCoordinate2D { | |
let frame = mapView.frame | |
let pos = CGPoint(x:mapView.center.x - frame.origin.x, | |
y:mapView.center.y - frame.origin.y); | |
//中央の座標 | |
let coordinate = mapView.projection.coordinate(for: pos) | |
return coordinate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Xml; | |
/** | |
* MEMO: 2017.04.19 | |
* とりあえず 指定の書式のxml を読み込む | |
* エラー処理は基本考慮していない |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//world ... b2World | |
{ | |
//DestroyBody -> DestroyJoint | |
for (auto body = world->GetBodyList(); body; body = body->GetNext()) | |
{ | |
world->DestroyBody(body); | |
} | |
// for (auto joint = world->GetJointList(); joint; joint = joint->GetNext()) | |
// { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <random> | |
//処理例 | |
{ | |
//乱数の初期化 | |
std::mt19937 rng; | |
{ | |
// 非決定的な乱数生成器 | |
std::random_device rnd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//解像度設定 | |
{ | |
//横画面 | |
//const auto designResolutionSize = Size( 480, 320); | |
//const auto smallResolutionSize = Size( 480, 320); | |
//const auto mediumResolutionSize = Size(1024, 768); | |
//const auto largeResolutionSize = Size(2048, 1536); | |
//縦画面 | |
const auto designResolutionSize = Size( 320, 480); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "HelloWorldScene.h" | |
#include "GLES-Render.h" | |
USING_NS_CC; | |
#pragma mark | |
const float HelloWorld::PTM_RATIO = (32.0f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const auto fileName = "image.png"; | |
if (auto frame = SpriteFrameCache::getInstance()->getSpriteFrameByName(fileName)) | |
{ | |
if (auto sprite = Sprite::createWithSpriteFrame(frame)) | |
{ | |
this->addChild(sprite); | |
} | |
} | |
else if (FileUtils::getInstance()->isFileExist(fileName)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Android SDK のダウンロード(解凍後 Application へ移動) | |
http://developer.android.com/sdk/index.html#Other | |
2. Eclipse Luna のダウンロード(解凍後 Application へ移動) | |
https://www.eclipse.org/downloads/ | |
※起動時に以下のコメントが... | |
「“eclipse”を開くには、以前の Java SE 6 ランタイムをインストールする必要があります。」 | |
対処方法 |