User Tools

Site Tools


wiki:essential_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:essential_functions [2019/07/13 15:20]
admin created
wiki:essential_functions [2019/07/13 15:29] (current)
admin
Line 8: Line 8:
   * [[#​OnDisable()]]   * [[#​OnDisable()]]
   * [[#​OnDestroy()]]   * [[#​OnDestroy()]]
-  * [[#​OnUpdate()]] +  * [[#​OnUpdate(number)]] 
-  * [[#​OnFixedUpdate()]] +  * [[#​OnFixedUpdate(number)]] 
-  * [[#​OnLateUpdate()]] +  * [[#​OnLateUpdate(number)]] 
-  * [[#​OnCollisionEnter()]] +  * [[#​OnCollisionEnter(PhysicalObject)]] 
-  * [[#OnCollisionEnter()]] +  * [[#OnCollisionStay(PhysicalObject)]] 
-  * [[#OnCollisionEnter()]] +  * [[#OnCollisionExit(PhysicalObject)]] 
-  * [[#OnCollisionEnter()]]+  * [[#OnTriggerEnter(PhysicalObject)]] 
 +  * [[#​OnTriggerStay(PhysicalObject)]] 
 +  * [[#​OnTriggerExit(PhysicalObject)]]
  
-==== new() ==== +==== OnAwake() ==== 
-  * **Description**: ​Create an instance of Vector2 with x and y equals to zero +  * **Description**: ​Called when the actor is created ​(Before OnStart)
-  * **Signature**: ​(): Vector2+
  
-==== new(number, number) ==== +==== OnStart() ==== 
-  * **Description**: ​Create an instance of Vector2 with the given values +  * **Description**: ​Called when the actor is created ​(After OnAwake)
-  * **Signature**: ​(x: number, y: number): Vector2+
  
-==== One() ==== +==== OnEnable() ==== 
-  * **Description**: ​Returns a (1,1) Vector2 +  * **Description**: ​Called when the actor gets enabled
-  * **Signature**:​ (): Vector2+
  
-==== Zero() ==== +==== OnDisable() ==== 
-  * **Description**: ​Returns a (0,0) Vector2 +  * **Description**: ​Called when the actor gets disabled
-  * **Signature**:​ (): Vector2+
  
-==== Length(Vector2) ==== +==== OnDestroy() ==== 
-  * **Description**: ​Returns ​the length of the given Vector2 +  * **Description**: ​Called when the actor is destroyed
-  * **Signature**:​ (target: Vector2): number+
  
-==== Normalize(Vector2) ==== +==== OnUpdate(number) ==== 
-  * **Description**: ​Returns the normalized version of the given Vector2 +  * **Description**: ​Called every gameplay frame (Before OnLateUpdate) 
-  * **Signature**:​ (targetVector2): number+  * **Signature**:​ (deltaTimenumber) : nil
  
-==== Dot(Vector2, Vector2) ==== +==== OnFixedUpdate(number) ==== 
-  * **Description**: ​Returns the dot product of the two given Vector2 +  * **Description**: ​Called every physics frame (at most 60 times per second) 
-  * **Signature**:​ (leftVector2, right: Vector2): number+  * **Signature**:​ (deltaTimenumber) : nil
  
-==== Lerp(Vector2, Vector2, ​number) ==== +==== OnLateUpdate(number) ==== 
-  * **Description**: ​Calculate the linear interpolation between two Vector2 using the given alpha +  * **Description**: ​Called every gameplay frame (After OnUpdate) 
-  * **Signature**:​ (start: Vector2, end: Vector2, alpha: number): ​Vector2+  * **Signature**:​ (deltaTime: number) : nil
  
-==== AngleBetween(Vector2, Vector2) ==== +==== OnCollisionEnter(PhysicalObject) ==== 
-  * **Description**: ​Calculate ​the angle between two Vector2 +  * **Description**: ​Called when the actor starts colliding with another actor 
-  * **Signature**:​ (leftVector2, rightVector2): number+  * **Signature**:​ (otherPhysicalObject):​ nil 
 + 
 +==== OnCollisionStay(PhysicalObject) ==== 
 +  * **Description**:​ Called while the actor is colliding with another actor 
 +  * **Signature**:​ (other: PhysicalObject):​ nil 
 + 
 +==== OnCollisionExit(PhysicalObject) ==== 
 +  * **Description**:​ Called when the actor stops colliding with another actor 
 +  * **Signature**:​ (other: PhysicalObject):​ nil 
 + 
 +==== OnTriggerEnter(PhysicalObject) ==== 
 +  * **Description**:​ Called when the actor enter a trigger zone 
 +  * **Signature**:​ (other: PhysicalObject):​ nil 
 + 
 +==== OnTriggerStay(PhysicalObject) ==== 
 +  * **Description**:​ Called while the actor is in a trigger zone 
 +  * **Signature**:​ (other: PhysicalObject):​ nil 
 + 
 +==== OnTriggerExit(PhysicalObject) ==== 
 +  * **Description**:​ Called when the actor exits a trigger zone 
 +  * **Signature**:​ (otherPhysicalObject): nil
  
wiki/essential_functions.txt · Last modified: 2019/07/13 15:29 by admin