1using System.Collections;
16 m_Pause =
new WaitForSeconds( 0.04f );
27 if( gameObject.transform.position.x < collision.gameObject.transform.position.x )
46 if( gameObject.transform.position.x > collision.gameObject.transform.position.x )
68 for(
int i = 0; i < 4; i++ )
70 gameObject.transform.GetChild(0).Rotate( 0f, 0f, 2f );
74 for(
int i = 0; i < 5; i++ )
76 gameObject.transform.GetChild(0).Rotate( 0f, 0f, -2f );
80 gameObject.transform.GetChild(0).Rotate( 0f, 0f, 2f );
98 for(
int i = 0; i < 4; i++ )
100 gameObject.transform.GetChild(0).Rotate( 0f, 0f, -2f );
104 for(
int i = 0; i < 5; i++ )
106 gameObject.transform.GetChild(0).Rotate( 0f, 0f, 2f );
110 gameObject.transform.GetChild(0).Rotate( 0f, 0f, -2f );
Create a class that create nudge effect on grass and some other items. When player get near items,...
IEnumerator RotateAntiClock()
Rotate the gameObject anti clock wise. We rotate it by 2 in 4 steps Then we rotate it in the opposite...
void OnTriggerExit2D(Collider2D collision)
Detect and starts coroutines when player exit from the collider that this bject is attached to
IEnumerator RotateClock()
Rotate the gameObject clock wise. We rotate it by 2 in 4 steps Then we rotate it in the opposite dire...
void OnTriggerEnter2D(Collider2D collision)
Detect and starts coroutines when player collided with an object that this script is attached to