Skip to content

Instantly share code, notes, and snippets.

View augustoerico's full-sized avatar

Erico Silva augustoerico

View GitHub Profile
def matcher = (description =~ /Tam\.: (\d+) a (\d+)/)
if (matcher.size()) {
matcher.getAt(0) // <- this is required... without it, first = -1 always...
println(matcher.group(1))
using UnityEngine;
public class OrbitalCamera : MonoBehaviour {
public GameObject lookAt;
public float followSpeed = 3.5f;
public float minAngle = -45.0f;
public float maxAngle = 60.0f;
using UnityEngine;
public class PlayerMovement : MonoBehaviour {
public Camera playerCamera = null;
public Animator animator = null;
public float moveSpeed = 5.0f;
public float crouchedMoveSpeed = 2.5f;
public float rotationSpeed = 5.0f;
@augustoerico
augustoerico / PopulationDensityGenerator.cs
Last active February 10, 2018 16:00
Population density generator using Perlin Noise for a 1000 u² terrain and 100 u³ blocs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Generator : MonoBehaviour {
public int height = 1000;
public int width = 1000;
public float noiseScale = 500.0f;
using UnityEngine;
public class CarMovement : MonoBehaviour {
public WheelCollider rl = null;
public WheelCollider rr = null;
public WheelCollider fl = null;
public WheelCollider fr = null;
public float torque = 10.0f;
package com.cgbros.silkhub.activity.listener
import android.widget.TextView
import com.cgbros.silkhub.R
import com.cgbros.silkhub.activity.LoginActivity
import com.google.firebase.database.FirebaseDatabase
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
@augustoerico
augustoerico / OrbitalController.js
Last active July 31, 2017 00:36
Controller behaving as a orbit
#pragma strict
var focus: GameObject;
private var orbitVector: Vector3;
private var moveX = 0;
private var moveY = 0;
function Update () {
def helloHandler = { Message message ->
def thread = Thread.currentThread()
println "HelloVerticle.helloHandler: $thread.id"
def name = message.body()
def now = new SimpleDateFormat().format(new Date())
def task = new TimerTask() {
@Override
void run() {