Skip to content

Instantly share code, notes, and snippets.

View pr00thmatic's full-sized avatar

Ruth García pr00thmatic

View GitHub Profile
using UnityEngine;
// use it like this:
// yield return new PauseFriendlyWaitForSeconds(1.3f);
public class PauseFriendlyWaitForSeconds : CustomYieldInstruction {
float elapsed = 0;
float waitingTime;
public override bool keepWaiting {
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Corutinas : MonoBehaviour {
public string state = "normal";
public float duration = 1.5f;
public float acceleration = 2;
public float speedBoost = 0;
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Ubuntu Mono" :foundry "outline" :slant normal :weight normal :height 98 :width normal)))))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

link a la(s) tarea en trello que éste pull request resuelve

What's new

Qué cosas nuevas hay ahora? Si es un refactor, se puede poner los cambios en el código... cosas como: "la fuerza de salto del personaje ahora es más fácil de configurar, ya que aprece en el inspector"

Known problems

Bugs que encontraron en la implementación del feature (relacionados al feature) pero que serán solucionados en un futuro branch

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Motion : MonoBehaviour {
public GameObject target;
public float speed = 5;
void Update () {
float deltaDistance = Time.deltaTime * speed;
public class MouseRaycastExample : MonoBehaviour {
public void MouseRaycast () {
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if (Input.GetMouseButtonDown(0) &&
Physics.Raycast(ray, out hit)) {
GameObject created = Instantiate(chispas);
created.transform.position = hit.point;
}
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Corrutinas : MonoBehaviour {
public bool control = true;
public Coroutine move = null;
void Start () {
StartCoroutine(Rotar());
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
[CustomEditor(typeof(asdf))]
public class AsdfEditor : Editor {
asdf Target { get => (asdf) target; }
// https://docs.unity3d.com/ScriptReference/EditorGUILayout.html
// https://docs.unity3d.com/ScriptReference/GUILayout.html
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class BallVictoryTriggerer : MonoBehaviour {
void OnEnable () {
}
void OnDisable () {
GameManager.OnGameEndingTriggered -= Asdf;
using UnityEngine;
using UnityEngine.Playables;
using System.Collections;
using System.Collections.Generic;
public class CinematicController : MonoBehaviour {
public PlayableDirector director;
public bool IsPaused { get => director.state == PlayState.Paused; }
public GameObject[] controlables;