This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class IAcoche : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
float _movimientoX; | |
float _movimientoY; | |
Rigidbody2D _rb; |
This file contains 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; | |
public class GameControl : MonoBehaviour { | |
public int puntuacion = 0; | |
public int vidas = 3; | |
public static GameControl gamecontrol; |
This file contains 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; | |
public class SaltoScript : MonoBehaviour { | |
public int angulo = -90; | |
public float lSpeed = 10.0f; // Set this to a value you like | |
public int salto = 200; | |
public float rotate_speed = 0.2f; | |
float rotate = 0; | |
bool isRotating = false; |
This file contains 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; | |
public class vistaScript : MonoBehaviour { | |
RaycastHit hit; | |
public float angulo; // Angulo de vision de la IA | |
public float distancia; // Distancia max de vision | |
public GameObject player; // Objetivo | |
void Update () { |
This file contains 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
/* | |
Ejemplo de cambio dinámico del campo de visión de una cámara | |
*/ | |
using UnityEngine; | |
using System.Collections; | |
public class clautrofobia : MonoBehaviour { | |
Camera camara; | |
public int factor_miedo = 1; // El factor muiedo indicará la velocidad con la que se reduce el campo de visión | |
// Use this for initialization |
This file contains 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; | |
public class ReSkinAnimation : MonoBehaviour { | |
public string spriteName; | |
// Update is called once per frame | |
void LateUpdate () { |
This file contains 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; | |
public class moveScript : MonoBehaviour { | |
public int horizontalSpeed = 20; | |
public int verticalSpeed = 20; | |
private Vector3 mousePosition; |
This file contains 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; | |
public class TurretController : MonoBehaviour { | |
private Vector3 mouse_pos; | |
private Vector3 object_pos; | |
private float angle; | |
private float bulletSpeed = 500; | |
public GameObject[] ammo; // Array of enemy prefabs. |
This file contains 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; | |
public class CannonController : MonoBehaviour { | |
private Vector3 mouse_pos; | |
private Vector3 object_pos; | |
private float angle; | |
// Use this for initialization |
This file contains 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; | |
public class TankController : MonoBehaviour { | |
[HideInInspector] | |
public bool jump = false; | |
public float moveForce = 365f; | |
public float maxSpeed = 5f; |
NewerOlder