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

Public Member Functions

override void OnFixedUpdate ()
 
virtual void OnFixedUpdate ()
 

Public Attributes

float airHeight = 3.5f
 
float floatPower = 30f
 
float pingpongTime = 1f
 
float pingpongPower = 0.15f
 
- Public Attributes inherited from RigidUpdate
Rigidbody2D rb
 
bool active = true
 
CollectibleActor _actor
 

Private Member Functions

void Awake ()
 

Private Attributes

float _airHeight
 
float time
 
float flip = 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 RigidFloat.cs.

Member Function Documentation

◆ Awake()

void RigidFloat.Awake ( )
inlineprivate

Definition at line 19 of file RigidFloat.cs.

20 {
21 _airHeight = airHeight + Random.Range(-2f, 2f);
22 time = Random.Range(0f, pingpongTime);
23 }
float time
Definition: RigidFloat.cs:15
float airHeight
Definition: RigidFloat.cs:5
float pingpongTime
Definition: RigidFloat.cs:9
float _airHeight
Definition: RigidFloat.cs:13

References _airHeight, airHeight, pingpongTime, Random, and time.

◆ OnFixedUpdate()

override void RigidFloat.OnFixedUpdate ( )
inlinevirtual

Reimplemented from RigidUpdate.

Definition at line 25 of file RigidFloat.cs.

26 {
27 time += Time.fixedDeltaTime * flip;
28 if (time > pingpongTime)
29 {
30 flip = -1f;
32 }
33 else if (time < 0f)
34 {
35 flip = 1f;
36 time = 0f;
37 }
38 float num = time - pingpongTime * 0.5f;
39 num = ((!(num > 0f)) ? (Mathf.Sqrt(0f - num) * -1f) : Mathf.Sqrt(num));
40 float num2 = _airHeight + num * pingpongPower;
41 float num3 = base.transform.position.y;
42 if (num3 < num2)
43 {
44 if (num3 < 1f)
45 {
46 num3 = 1f;
47 }
48 rb.AddForce(new Vector2(0f, floatPower * (1f - num3 / num2)));
49 }
50 }
float flip
Definition: RigidFloat.cs:17
float pingpongPower
Definition: RigidFloat.cs:11
float floatPower
Definition: RigidFloat.cs:7
Rigidbody2D rb
Definition: RigidUpdate.cs:13

References _airHeight, flip, floatPower, pingpongPower, pingpongTime, RigidUpdate.rb, and time.

Member Data Documentation

◆ _airHeight

float RigidFloat._airHeight
private

Definition at line 13 of file RigidFloat.cs.

Referenced by Awake(), and OnFixedUpdate().

◆ airHeight

float RigidFloat.airHeight = 3.5f

Definition at line 5 of file RigidFloat.cs.

Referenced by Awake().

◆ flip

float RigidFloat.flip = 1f
private

Definition at line 17 of file RigidFloat.cs.

Referenced by OnFixedUpdate().

◆ floatPower

float RigidFloat.floatPower = 30f

Definition at line 7 of file RigidFloat.cs.

Referenced by OnFixedUpdate().

◆ pingpongPower

float RigidFloat.pingpongPower = 0.15f

Definition at line 11 of file RigidFloat.cs.

Referenced by OnFixedUpdate().

◆ pingpongTime

float RigidFloat.pingpongTime = 1f

Definition at line 9 of file RigidFloat.cs.

Referenced by Awake(), and OnFixedUpdate().

◆ time

float RigidFloat.time
private

Definition at line 15 of file RigidFloat.cs.

Referenced by Awake(), and OnFixedUpdate().


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