Herramientas de usuario

Herramientas del sitio


fw:unity3d:environtment2d

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
fw:unity3d:environtment2d [2014/04/24 13:33]
alfred [GUI elements]
fw:unity3d:environtment2d [2020/05/09 09:25] (actual)
Línea 26: Línea 26:
   * ''​OnDisable()''​   * ''​OnDisable()''​
   * ''​OnGUI()''​   * ''​OnGUI()''​
 +
 +Properties
 +  * ''​transform'',​ contains the methods and objects to move the object.
  
 === Interact with objects === === Interact with objects ===
Línea 36: Línea 39:
   * ''​Destroy(gameObject,​ time)'',​ will destroy an instatiated prefab on 20secs.   * ''​Destroy(gameObject,​ time)'',​ will destroy an instatiated prefab on 20secs.
   * ''​Destroy(gameObject)'',​ destroys the object now.   * ''​Destroy(gameObject)'',​ destroys the object now.
 +  * ''​SendMessage'',​ calls a method on each script which have it inside the GameObject.
 +<code csharp>
 +// Calls the function ApplyDamage with a value of 5
 +gameObject.SendMessage ("​ApplyDamage",​ 5.0);
 +...
 +// Every script attached to the game object ​
 +// that has an ApplyDamage function will be called.
 +function ApplyDamage (damage : float) {...
 +</​code>​
  
   * Propiedades:​   * Propiedades:​
Línea 69: Línea 81:
   * ''​Debug.Log()'',​ shows a message in console.   * ''​Debug.Log()'',​ shows a message in console.
   * ''​Debug.Break()'',​ stops the game.   * ''​Debug.Break()'',​ stops the game.
 +
 +=== Camera ===
 +The static object ''​Camera.main''​ contains the main camera for the scene.
 +  * ''​ViewportToWorldPoint''​ and ''​WorldToViewportPoint''​ to transform coordinates.
  
 === Useful functions === === Useful functions ===
fw/unity3d/environtment2d.1398346431.txt.gz · Última modificación: 2020/05/09 09:24 (editor externo)