Skip to content

Instantly share code, notes, and snippets.

Phaser Cheatsheet

This is the content from the original Phaser cheatsheet, the site of which went down. I'm editing outdated information as I come across it.

Starting a new game

Reference: http://docs.phaser.io/Phaser.Game.html#Game

var game = new Phaser.Game(width, height, renderer, "parent");
//All parameters are optional but you usually want to set width and height
//Remember that the game object inherits many properties and methods!
@Kvisaz
Kvisaz / assets.md
Created April 2, 2020 05:44 — forked from bbudd/assets.md
Loading static assets using electron-forge v6 and the webpack plugin

I spent a few hours chasing down just how to get my static assets (css, fonts, images) to load in an Electron app built using electron-forge v6 (https://www.electronforge.io/) and its webpack plugin (https://www.electronforge.io/config/plugins/webpack) while in development mode. There really isn't any documentation available online, either in the electron-forge documentation or in places like blogs or gists or stackoverflow. So I thought I'd put it down here.

Step 1

Load CopyWebpackPlugin npm i -D copy-webpack-plugin


Step 2

Use the plugin to move your directories into place.

@Kvisaz
Kvisaz / app_checkbox.dart
Created August 7, 2020 14:58 — forked from marcusedu/app_checkbox.dart
Flutter Checkbox com label
import 'package:flutter/material.dart';
class AppCheckbox extends StatelessWidget {
final String label;
final bool value;
final ValueChanged<bool> onChanged;
final TextStyle labelStyle;
const AppCheckbox(
{Key key, this.label, this.value, this.onChanged, this.labelStyle})

Жили в одном городе семья. А была у них девочка, звали ее Ия-Ия. Мама все время ей говорила, чтобы она не ходила на кладбище и никогда там не оставалась одна.

А мама всегда ей говорит:

— Хорошо, я тебе скажу, куда идти ночью ходить!

Дети пошли с мамой к одному парню, где жил один мужик, а с ним жил его сын, они часто гуляли вместе по ночам и всегда приносили ему поесть и напивались до бесчувствия. Однажды они собрались идти к этому мужику, когда увидели страшный красный огонь в небе. Мама сказала детям спать и спрятала их под кроватью.

Ночью эта компания услышала шорох за стенкой и девочки испугались. Они выбежали из дома и увидали, что на месте их домика возвышается огромная каменная башня, но когда эти маленькие дети подумали о том, что это может быть, им стало страшно еще больше. Вдруг снова раздался тот же самый звук, только другой голос: