Skip to content

Instantly share code, notes, and snippets.

View alegueleres's full-sized avatar

Alexandre Gueleres alegueleres

  • Cordeirópolis/SP
View GitHub Profile
@alegueleres
alegueleres / ObjectPooler.cs
Last active September 18, 2018 07:37
Object Pooler used in Unity to instantiate objects in the level load of game, and use this instances, instead creating and destroying objects. The reason is to save CPU processment. Used the tutorial: https://www.raywenderlich.com/136091/object-pooling-unity. You can verify how to use this object pooler, it is a very cool approach.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectPooler : MonoBehaviour {
public static ObjectPooler SharedInstance;
public List<ObjectPoolItem> itemsToPool;
public List<GameObject> pooledObjects;
"use strict";
var lines = ["A", "B", "C", "D", "E", "F", "G", "H", "I"];
function resolver(game) {
var t0 = performance.now();
var solved = solveSudoku(convertToLineArray(game), 0, 0);
var t1 = performance.now();
console.log("Call to solveSudoku took " + (t1 - t0) + " milliseconds.");
return solved;
git fetch origin --prune
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D
{
"eslint.enable": true,
"window.zoomLevel": 0,
"files.trimTrailingWhitespace": true,
"prettier.singleQuote": true,
"prettier.trailingComma": "es5",
"prettier.eslintIntegration": true,
"prettier.disableLanguages": [],
"eslint.autoFixOnSave": true,
"editor.insertSpaces": true,