Skip to content

Instantly share code, notes, and snippets.

@carlows
carlows / Gemfile.erb
Last active February 17, 2016 16:47
Rails Templates
source 'https://rubygems.org'
gem 'rails', '<%= RAILS_VERSION %>'
gem 'autoprefixer-rails'
gem 'newrelic_rpm'
gem 'pg'
gem 'rack-canonical-host'
gem 'rack-timeout'
gem 'simple_form'
gem 'puma'
require 'rest-client'
RestClient.post('http://www.unitec.edu.ve/servlet/unicodeServlets.Login', {:TID => "usuario", :TClave => "contraseña"}){ |response, request, result, &block|
if [301, 302, 307].include? response.code
session_cookie = "JSESSIONID=#{response.cookies["JSESSIONID"]}"
puts session_cookie
response = RestClient.get 'http://www.unitec.edu.ve/indexestudiante.jsp', {:Cookie => session_cookie}
puts response
else
if (distancia < 25.0f && distancia > 20.0f){
anim.SetBool ("Visto",true);
velocidad = 4.0f;
}
else if (distancia < 20 && distancia > 5.0f){
anim.SetBool("Visible",true);
velocidad = 2.0f;
Globales.vida -= 10 * Time.deltaTime;
else if(distancia < 5.0f){
velocidad = 0.0f;
if(distancia > 20.0f && distancia < 25.0f)
{
mover(2.0f);
}
else if(distancia < 20.0f && distancia > 5.0f)
{
mover(4.0f);
}
else
{
void OnTriggerEnter2D(Collider2D other){
if(other.transform.tag == "Player"){
var respawnScript = other.gameObject.GetComponent<Script>();
respawnScript.Respawn();
}
}