This file contains hidden or 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; | |
public class MovimientoDelHeroe : MonoBehaviour { | |
[Header("Initialization")] | |
public Camera cam; | |
[Header("Information")] | |
public float speed = 30; // m/s |
This file contains hidden or 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
# name: playcanvas! | |
# key: lets-jam | |
# -- | |
(() => { | |
var ${1:` | |
(concat (upcase (substring (file-name-base buffer-file-name) 0 1)) (substring (file-name-base buffer-file-name) 1)) | |
`} = pc.createScript('${2:` | |
(concat (downcase (substring (file-name-base buffer-file-name) 0 1)) (substring (file-name-base buffer-file-name) 1)) | |
`}'); |
This file contains hidden or 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 UnityEngine.XR; | |
using System.Collections; | |
using System.Collections.Generic; | |
// en la documentación de Unity XRInput podrás leer más sobre | |
// los comandos usados en este script | |
// --> https://docs.unity3d.com/Manual/xr_input.html | |
public class OculusControllerExample : MonoBehaviour { | |
[Header("Configuration")] |
This file contains hidden or 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; | |
public class Arrow : MonoBehaviour { | |
[Header("Information")] | |
public bool isSelected = true; | |
public float distance = 0; | |
[Header("Initialization")] |
This file contains hidden or 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; | |
public class ArrowPorter : MonoBehaviour { | |
public static ArrowPorter selected; | |
[Header("Initialization")] | |
public Arrow arrowPrototype; | |
public Camera specialCamera; |
This file contains hidden or 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 UnityEngine.UI; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Dialogue : MonoBehaviour { | |
public static bool isOpen = false; | |
public static Dialogue Instance; | |
public static float timeClosed; |
This file contains hidden or 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 UnityEngine.UI; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Interact : MonoBehaviour { | |
[Header("Configuration")] | |
public string nameOfInteractable = "LUDOTECA"; | |
public KeyCode keyToInteract = KeyCode.Space; | |
public KeyCode keyToExit = KeyCode.Escape; |
This file contains hidden or 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 UnityEngine.InputSystem; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
// jugando con el vibrador del gamepad... | |
// a mi me pasó que la primera vez que intenté usar el vibrador no me funcionó porque Unity dejaba de detectar mi gamepad | |
// de forma intermitente... uso un control de PS4 que me da montón de problemas! | |
// para probarlo, dale play, y mueve el stick izquierdo de tu control, debería vibrar intermitentemente... |
This file contains hidden or 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 SimpleJSON; | |
JSONNode parsed = JSON.Parse(request.downloadHandler.text); | |
list.list.Add(new OnlineListData.OnlineMediaData() { url = parsed[i]["url"], title = parsed[i]["title"] }); |
This file contains hidden or 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
public Vector3 ThrowBall (Vector3 origin, Vector3 destination, | |
float overHeight = 0.5f, bool hProportionalToDistance = true, | |
float maximumDistanceToCapHeight = 1) { | |
Vector3 force = Vector3.zero; | |
float distance = (Utils.SetY(0, origin) - Utils.SetY(0, destination)).magnitude; | |
float height = Mathf.Abs(origin.y - destination.y) + overHeight * | |
(hProportionalToDistance? Mathf.Max(maximumDistanceToCapHeight, distance): 1); | |
float gravity = Physics.gravity.magnitude; |
NewerOlder