Edit the hosts file
sudo nano /etc/hosts
Add this line somewhere after 127.0.0.1 localhost
:
127.0.0.1 your.domain.com
Save and exit (Ctrl + O, Ctrl + X). Flush the DNS cache:
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render }); | |
var map; | |
var tileset; | |
var layer; | |
var player; | |
var facing = 'left'; | |
var jumpTimer = 0; | |
var cursors; | |
var jumpButton; |
Edit the hosts file
sudo nano /etc/hosts
Add this line somewhere after 127.0.0.1 localhost
:
127.0.0.1 your.domain.com
Save and exit (Ctrl + O, Ctrl + X). Flush the DNS cache:
Taken from Jerry Weinberg's book The Psychology of Computer Programming
This script requires the Nine Slice Scaling script from https://gist.github.com/mandarinx/06192ee17d68c528edb9
Each update a ray is cast on a plane, based on the mouse cursor position. The hit point is snapped to a grid defined by unitSize and gridSize. The distance between the grid index of mouse click and index of mouse release is used to calculate the area of selection.
From: http://unity3d.com/learn/resources/performance-optimization-tips-and-tricks-unity
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Linq; | |
public class GearRotator : MonoBehaviour | |
{ | |
[SerializeField] private float m_radiusThreshold = 4f; | |
private float m_startingAngle; | |
private Quaternion m_startingRotation; |
while (this.numChildren > 0) | |
{ | |
removeChild(this.getChildAt(0)); | |
} | |
// Remove children as part of an event handler | |
private function eventHandler(e:Event):void | |
{ | |
e.target.parent.removeChild(e.target); |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using System.Collections.Generic; | |
using UnityEditor.AnimatedValues; | |
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)] | |
[CanEditMultipleObjects] | |
public class CustomEditorBase : Editor | |
{ |
[Unity] Initialize engine version: 5.3.5p2 (3103edb99077) | |
[Unity] Assets/Rocks and Boulders 2/Shaders/RotateGameObject.cs(18,35): warning CS0618: `UnityEngine.Transform.RotateAroundLocal(UnityEngine.Vector3, float)' is obsolete: `use Transform.Rotate instead.' | |
[Unity] Assets/UBER/Scripts/UBER_GlobalParams.cs(323,24): warning CS0618: `UnityEngine.ParticleSystem.emissionRate' is obsolete: `emissionRate property is deprecated. Use emission.rate instead.' | |
[Unity] Assets/UBER/Scripts/UBER_GlobalParams.cs(326,40): warning CS0618: `UnityEngine.ParticleSystem.emissionRate' is obsolete: `emissionRate property is deprecated. Use emission.rate instead.' | |
[Unity] Assets/Rocks and Boulders 2/Shaders/RotateGameObject.cs(18,35): warning CS0618: `UnityEngine.Transform.RotateAroundLocal(UnityEngine.Vector3, float)' is obsolete: `use Transform.Rotate instead.' | |
[Unity] Assets/UBER/Scripts/UBER_GlobalParams.cs(323,24): warning CS0618: `UnityEngine.ParticleSystem.emissionRate' is obsolete: `emissionRate property is deprecated. Use |
// The MIT License (MIT) | |
// Copyright (c) 2016 David Evans @phosphoer | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR |