Entradas

Mostrando las entradas etiquetadas como c# español

IA: Seguir objetivo y esconderse en Unity3D

Imagen
Muy buenas!! Hoy traigo un aporte interesante, un script sobre inteligencia artificial para Unity3D. Con este script podrás hacer que el objeto A persiga al objeto B y que el objeto B se pueda esconder dejando A de seguirle (Que rayada acabo de escribir jajajajaja) Bueno por aquí el Script: using UnityEngine; using System.Collections; public class FollowPlayer : MonoBehaviour { public Transform target;     public float moveSpeed = 3;     public float rotationSpeed = 3;     public float distance = 5f;     public bool Enabled = false;     public bool Detect = false;     private Transform myTransform;     void Awake()     {         myTransform = this.GetComponent<Transform>();     }     void Start()     {         target = GameObject.FindWithTag("Player").transform;     }   ...

Joystick para Android/IOS en C# Unity3D

Buenas, hoy os comparto un script para hacer un Joystick en C#. Es un port de un script que ya viene en Unity3D y que podéis encontrar en Standard Asset Mobile, este Script estaba en javascript y bueno, lo pasé a C#. Espero que a alguien le sea útil. using UnityEngine; using System.Collections; ////////////////////////////////////////////////////////////// // PORT DE Joystick.js A Joystick.cs //Nicolás Sánchez Baile // Joystick creates a movable joystick (via GUITexture) that // handles touch input, taps, and phases. Dead zones can control // where the joystick input gets picked up and can be normalized. // // Optionally, you can enable the touchPad property from the editor // to treat this Joystick as a TouchPad. A TouchPad allows the finger // to touch down at any point and it tracks the movement relatively // without moving the graphic ////////////////////////////////////////////////////////////// // A simple class for bounding how far the GUITexture ...

Curso de programación Unity3D C# 11: Interfaz 3 GUISKIN

Imagen
Como siempre, en la descripción del vídeo tenéis un enlace al proyecto completo ;)