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 ValidateGooglePlaySignature( $responseData, $signature, $publicKey, &$status, &$response ) | |
{ | |
$responseData = trim( $responseData ); | |
$signature = trim( $signature ); | |
$response = json_decode( $responseData ); | |
// Create an RSA key compatible with openssl_verify from our Google Play sig | |
$key = "-----BEGIN PUBLIC KEY-----\n". | |
chunk_split($publicKey, 64,"\n"). | |
'-----END PUBLIC KEY-----'; |
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; | |
using System.Collections.Generic; | |
[RequireComponent( typeof( ParticleSystem ) )] | |
public class ParticleFlock : MonoBehaviour | |
{ | |
public Vector3 targetPosition; | |
public int totalBoids = 15; |
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 int C2_GJK_ITERS = 20; | |
public const int C2_MAX_POLYGON_VERTS = 8; | |
// position of impact p = ray.p + ray.d * raycast.t | |
public static c2v c2Impact(c2Ray ray, float t) => c2Add(ray.p, c2Mulvs(ray.d, t)); | |
#region Wrapper Methods | |
public static unsafe bool c2Collided(void* A, c2x* ax, C2_TYPE typeA, void* B, c2x* bx, C2_TYPE typeB) |
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
/* | |
* Copyright (c) 2012 Calvin Rien | |
* | |
* Based on the JSON parser by Patrick van Bergen | |
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
* | |
* Simplified it so that it doesn't throw exceptions | |
* and can be used in Unity iPhone with maximum code stripping. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining |
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
// Usage: | |
// - stick the Vector3Editor.cs file in the Editor folder of your project | |
// - create a class with a Vector3 or Vector3[] property (you probably already have plenty of them. The WarpZone class below is a simple example) | |
// - create an editor script for any the class that you want to be able to edit extending Vector3Editor (see WarpZoneEditor below) | |
// - in OnEnable simply call setup() with your property names and optional labels | |
using UnityEngine; | |
using UnityEditor; |
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
Key: | |
"-" negative point | |
"+" positive point | |
"+-" could go either way depending on your opinion or if it functions or not | |
Background Info: the last project we worked on needed basic 2D functionality (sprites and animations) and SpriteKit was born to fill this need (http://www.youtube.com/watch?v=cabAr2CdLmc). It has no fancy editors and was really made to fit a specific need and as of yet it has not been extended much further than the video shows. Something a bit more full featured is required for a new prototype and instead of spending a bunch of time extending SpriteKit we went on a search for alternatives. None of the below frameworks are perfect and they all have pluses and minuses. One thing SpriteKit had that none of the others do is automatic texture selection based on screen resolution. That is one thing I would like to see incorporated in every 2D framework and it kind of surprises me that it isn't one of the first features added when making a 2D framework. | |
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 Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Graphics; | |
using Microsoft.Xna.Framework.Input; | |
using Nez; | |
namespace TheWall | |
{ | |
public class Game2 : Game | |
{ |
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
- download the jar file from here: https://mega.co.nz/#!pd81gYBA!ui33ktU2xDqmcsYOv5oSZ6v-niPp1ofwh02naT7Vqbs Note that anytime you import any other plugins make sure that file doesn't get overwritten! | |
- overwrite the file with the same name in the Plugins/Android folder with the downloaded jar | |
- generate an AndroidManifest.xml file | |
- add the required permissions for Vuforia to the generated AndroidManifest.xml (see their docs for the details) |
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 Microsoft.Xna.Framework; | |
using Nez; | |
using Nez.Sprites; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Vapor.Code.Utility; |
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
// ##### ##### ##### ##### ##### ##### ##### | |
// ##### ##### Common Uniforms ##### ##### | |
// ##### ##### ##### ##### ##### ##### ##### | |
float4x4 _objectToWorld; | |
float4x4 _worldToView; | |
float4x4 _projection; // viewToCamera? | |
float4x4 _screenToWorld; // this is used to compute the world-position | |
// color of the light |