Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
RigidLeaf Class Reference
Inheritance diagram for RigidLeaf:
RigidUpdate EMono

Public Member Functions

override void OnFixedUpdate ()
 
virtual void OnFixedUpdate ()
 

Public Attributes

float floatPower = 0.6f
 
float slidePower = 15f
 
- Public Attributes inherited from RigidUpdate
Rigidbody2D rb
 
bool active = true
 
CollectibleActor _actor
 

Private Member Functions

void Awake ()
 

Private Attributes

Vector2 v
 
float flip = 1f
 
float time
 
float maxTime
 
float f
 
float power = 1f
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from RigidUpdate
static float delta
 
static float leftX
 
static float rightX
 
- Static Public Attributes inherited from EMono
static Core core
 
- Properties inherited from RigidUpdate
CollectibleActor actor [get]
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Detailed Description

Definition at line 3 of file RigidLeaf.cs.

Member Function Documentation

◆ Awake()

void RigidLeaf.Awake ( )
inlineprivate

Definition at line 21 of file RigidLeaf.cs.

22 {
23 maxTime = Random.Range(0.5f, 1.5f);
24 }
float f
Definition: RigidLeaf.cs:17
float maxTime
Definition: RigidLeaf.cs:15

References f, maxTime, and Random.

◆ OnFixedUpdate()

override void RigidLeaf.OnFixedUpdate ( )
inlinevirtual

Reimplemented from RigidUpdate.

Definition at line 26 of file RigidLeaf.cs.

27 {
28 _ = base.transform.position;
29 if (base.transform.position.y < 3f)
30 {
31 power -= Time.fixedDeltaTime * 0.03f;
32 }
33 else
34 {
35 power = 1f;
36 }
37 if (!(power < 0f))
38 {
39 time += flip * 0.01f;
40 if (time > maxTime)
41 {
42 maxTime = Random.Range(0.5f, 1.5f);
43 time = maxTime;
44 flip = -1f;
45 }
46 else if (time < 0f)
47 {
48 maxTime = Random.Range(0.5f, 1.5f);
49 time = 0f;
50 flip = 1f;
51 }
52 f = time - maxTime * 0.5f;
53 v.x = f * slidePower * power;
54 v.y = (10f - Mathf.Clamp(((f > 0f) ? f : (0f - f)) * 10f, 0f, 10f)) * floatPower * power;
55 rb.AddForce(v);
56 }
57 }
float power
Definition: RigidLeaf.cs:19
float floatPower
Definition: RigidLeaf.cs:5
Vector2 v
Definition: RigidLeaf.cs:9
float slidePower
Definition: RigidLeaf.cs:7
float flip
Definition: RigidLeaf.cs:11
float time
Definition: RigidLeaf.cs:13
Rigidbody2D rb
Definition: RigidUpdate.cs:13

References f, flip, floatPower, maxTime, power, Random, RigidUpdate.rb, slidePower, time, and v.

Member Data Documentation

◆ f

float RigidLeaf.f
private

Definition at line 17 of file RigidLeaf.cs.

Referenced by Awake(), and OnFixedUpdate().

◆ flip

float RigidLeaf.flip = 1f
private

Definition at line 11 of file RigidLeaf.cs.

Referenced by OnFixedUpdate().

◆ floatPower

float RigidLeaf.floatPower = 0.6f

Definition at line 5 of file RigidLeaf.cs.

Referenced by OnFixedUpdate().

◆ maxTime

float RigidLeaf.maxTime
private

Definition at line 15 of file RigidLeaf.cs.

Referenced by Awake(), and OnFixedUpdate().

◆ power

float RigidLeaf.power = 1f
private

Definition at line 19 of file RigidLeaf.cs.

Referenced by OnFixedUpdate().

◆ slidePower

float RigidLeaf.slidePower = 15f

Definition at line 7 of file RigidLeaf.cs.

Referenced by OnFixedUpdate().

◆ time

float RigidLeaf.time
private

Definition at line 13 of file RigidLeaf.cs.

Referenced by OnFixedUpdate().

◆ v

Vector2 RigidLeaf.v
private

Definition at line 9 of file RigidLeaf.cs.

Referenced by OnFixedUpdate().


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