A 2D Farming RPG
This is just a simple 2D farming RPG game
Loading...
Searching...
No Matches
ItemNudge Class Reference

Create a class that create nudge effect on grass and some other items. When player get near items, it will create a wobbly effect. More...

Inheritance diagram for ItemNudge:
Inheritance graph
Collaboration diagram for ItemNudge:
Collaboration graph

Private Member Functions

void Awake ()
 
void OnTriggerEnter2D (Collider2D collision)
 Detect and starts coroutines when player collided with an object that this script is attached to More...
 
void OnTriggerExit2D (Collider2D collision)
 Detect and starts coroutines when player exit from the collider that this bject is attached to More...
 
IEnumerator RotateAntiClock ()
 Rotate the gameObject anti clock wise. We rotate it by 2 in 4 steps Then we rotate it in the opposite direction by 2 in 5 steps Finally, we return to the original position. More...
 
IEnumerator RotateClock ()
 Rotate the gameObject clock wise. We rotate it by 2 in 4 steps Then we rotate it in the opposite direction by 2 in 5 steps Finally, we return to the original position. More...
 

Private Attributes

WaitForSeconds m_Pause
 
bool m_IsAnimating = false
 

Detailed Description

Create a class that create nudge effect on grass and some other items. When player get near items, it will create a wobbly effect.

Definition at line 8 of file ItemNudge.cs.

Member Function Documentation

◆ Awake()

void ItemNudge.Awake ( )
inlineprivate

Definition at line 14 of file ItemNudge.cs.

◆ OnTriggerEnter2D()

void ItemNudge.OnTriggerEnter2D ( Collider2D  collision)
inlineprivate

Detect and starts coroutines when player collided with an object that this script is attached to

Parameters
collision

Definition at line 23 of file ItemNudge.cs.

Here is the call graph for this function:

◆ OnTriggerExit2D()

void ItemNudge.OnTriggerExit2D ( Collider2D  collision)
inlineprivate

Detect and starts coroutines when player exit from the collider that this bject is attached to

Parameters
collision

Definition at line 42 of file ItemNudge.cs.

Here is the call graph for this function:

◆ RotateAntiClock()

IEnumerator ItemNudge.RotateAntiClock ( )
inlineprivate

Rotate the gameObject anti clock wise. We rotate it by 2 in 4 steps Then we rotate it in the opposite direction by 2 in 5 steps Finally, we return to the original position.

Returns

Definition at line 64 of file ItemNudge.cs.

Here is the caller graph for this function:

◆ RotateClock()

IEnumerator ItemNudge.RotateClock ( )
inlineprivate

Rotate the gameObject clock wise. We rotate it by 2 in 4 steps Then we rotate it in the opposite direction by 2 in 5 steps Finally, we return to the original position.

Returns

Definition at line 94 of file ItemNudge.cs.

Here is the caller graph for this function:

Field Documentation

◆ m_IsAnimating

bool ItemNudge.m_IsAnimating = false
private

Definition at line 12 of file ItemNudge.cs.

◆ m_Pause

WaitForSeconds ItemNudge.m_Pause
private

Definition at line 10 of file ItemNudge.cs.


The documentation for this class was generated from the following file: