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 UnityEngine; | |
[CreateAssetMenu] | |
public class CastService : ScriptableObject | |
{ | |
public float maxDistance = Mathf.Infinity; | |
public LayerMask mask; | |
public QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.UseGlobal; | |
public bool Raycast (Vector3 origin, Vector3 direction, out RaycastHit hitInfo) |
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 gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var through2 = require('through2'); | |
gulp.task('build', function () { | |
return gulp.src('./src/main.js') | |
.pipe(through2.obj(function (file, enc, next) { | |
browserify(file.path, { debug: process.env.NODE_ENV === 'development' }) | |
.transform(require('babelify')) | |
.bundle(function (err, res) { |
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
function Screenshake (game, parent) { | |
Phaser.Plugin.call(this, game, parent); | |
this.timer = this.game.time.create(false); | |
this.timer.start(); | |
this.shakeCount = 0; | |
this.shakeAmount = 1; | |
this._initialBounds = this.game.camera.bounds; |
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
// The only thing HSHG expects a collidable object to have is a getAABB() method that | |
// returns an object with two properties, min and max, that should both have a single | |
// array with two numbers as coordinates. For example, an object at 10, 10 and | |
// height/width of 100 would return { min: [10, 10], max: [110, 110] } | |
function Vertex(args /*x, y, radius*/){ | |
var argProp; | |
for(argProp in args){ | |
if(args.hasOwnProperty(argProp)){ |
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
#showtooltip Sap | |
/console SET targetNearestDistance 10 | |
/targetenemy [noharm] | |
/console SET targetNearestDistance 41 | |
/cast Sap |
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 UnityEngine; | |
[System.Serializable] | |
public class Edge | |
{ | |
public Edge() | |
{ | |
} | |
public Edge(Node node, int cost) | |
{ |
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
(VBoxManage list runningvms | grep "Ora_XE" && echo "Oracle VM is already running... skipping start step.") || VBoxManage startvm Ora_XE_11.2 |
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 UnityEngine; | |
using System.Collections; | |
public class CoupledComponent : MonoBehaviour | |
{ | |
void Update () | |
{ | |
if (Input.GetKeyDown(KeyCode.E)) | |
{ | |
PerformAction(); |
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 UnityEngine; | |
using System.Collections; | |
public class FooScript : MonoBehaviour | |
{ | |
// Use this for initialization | |
void Start() | |
{ | |
} |
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 UnityEngine; | |
public class MouseFollow : MonoBehaviour | |
{ | |
new public Camera camera; | |
public float zValue = 0; | |
public enum CoordinateSystem | |
{ | |
World, |