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
// My "library" method. | |
public static async Task<JObject> GetJsonAsync(Uri uri) | |
{ | |
using (var client = new HttpClient()) | |
{ | |
var jsonString = await client.GetStringAsync(uri); | |
return JObject.Parse(jsonString); | |
} | |
} |
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 partial class ItemsPage : ContentPage | |
{ | |
public ItemsPage() | |
{ | |
InitializeComponent(); | |
On<Xamarin.Forms.PlatformConfiguration.iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Never); | |
} | |
... | |
} |
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
protected override void OnAppearing() | |
{ | |
base.OnAppearing(); | |
var safeInsets = On<Xamarin.Forms.PlatformConfiguration.iOS>().SafeAreaInsets(); | |
safeInsets.Left = 24; | |
this.Padding = safeInsets; | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" | |
ios:Page.UseSafeArea="true" > |
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 Xamarin.Forms.PlatformConfiguration.iOSSpecific; | |
using Xamarin.Forms; | |
namespace iPhoneX | |
{ | |
public partial class ItemsPage : ContentPage | |
{ | |
public ItemsPage() | |
{ | |
InitializeComponent(); |
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 { Game, ScaleManager } from "phaser-ce"; | |
import Player from "./player"; | |
declare class WebFont { | |
public static load(options: object): void; | |
} | |
window.onload = () => { | |
WebFont.load({ | |
active: () => { |
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
export default class Player { | |
constructor() { | |
console.log("Good"); | |
} | |
} |
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
var browserify = require('browserify'); | |
var tsify = require('tsify'); | |
browserify() | |
.add('src/main.ts') | |
.plugin(tsify, { project: '.' }) | |
.transform('browserify-shim') | |
.bundle() | |
.on('error', function (error) { console.error(error.toString()); }) | |
.pipe(process.stdout); |
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
{ | |
"name": "phaser-test", | |
"version": "1.0.0", | |
"description": "A Phaser Test Game", | |
"scripts": { | |
"build": "node browserify.js > dist/bundle.js", | |
"serve": "node_modules/.bin/http-server -c-1" | |
}, | |
"browserify-shim": { | |
"phaser": "global:Phaser", |