MTON_FRAMEWORK
Code
Interface
Classes
// used to compose /Objects
(char)
cInput.cs
// Handles almost all input logic
// How long has button been held...etc
(var)
public
OnBTTN
OnAttkDelegate
On__IODelegate
bool
b__IO { ... }
this.set__IO(value);
(func)
public
virtual
void
doAttk(bool bAttk){ ... }
OnAttkDelegate(bAttk);
private
void
set__IO(bool b__io){ ... }
this.On__IODelegate(b__io);
cRbody.cs
// Handles almost all position logic : Move, Jump ...etc
// Checks for ground state...etc
cAnimn.cs
//Listener for all valid events
//Almost all delegates get called from here!
(var)
public
DL_bVal
OnAttkDelegate
...
eStateB
attkST{ ... }
set{ ... }
if(value == eStateB.DN){ ... }
this.setAttk(true);
(func)
public
void
setAttk(bool bAttk){ ... }
this.OnAttkDelegate(bAttk);
cMcanm.cs
//manages String state to animator hash conversion
(var)
public
cAnimn
anST
// animation state
Animator
anim
// mecanim animator
void
Init(){ ... }
anST.OnAttkDelegate += SetAttk;
(func)
public
void
animator_Hash_ID(){ ... }
_bAttk_ID = Animator.StringToHash(this._bAttk );
//HACK : if Animator fails to find string, it'll return a value of 0
public void SetAttk(bool bAttk){ ... }
anim.SetTrigger(_bAttk_ID);
// Play Animation
cRadar.cs
//Player awareness scans eligible targets in level
(misc)
(env)
cLevel.cs
cHint.cs
(fx)
(emit)
Objects
// directly attach to GameObject
oPlayer.cs
oEnemy.cs
(class)
(structs)
public
(delegates)
OnEnable(){...}
io
//direct input
io.OnAttkDelegate += setAttk ;
rb
//rigidbody events
ht
//health logic
an
//animation : input + character/env state
//radar
(functions)
public
virtual
void
// POSITION
//GET
FixedUpdate(){ ... }
// Calculate position state delta for animator
//SET
(position update)
doMove(Vector3 moveDir){ ... }
//Handles movement and facing
setJump(bool bJump){ ... }
setCrouch(bool bDuck){ ... }
(collision update)
setGround(bool IN_GROUND){ ... }
setCeilng(bool IN_CEILING){ ... }
setRise(bool bRise){ ... }
// tuck and untuck collision
(health update)
doHitd(int iHurt){ ... }
//Taking damage
setDead(bool bDead){ ... }
(animation update)
doFace(Vector3 vFace){ ... }
setIdlV(bool bIdlV){ ... }
//Sudden landing visual swap out
setIdlH(bool bIdlH){ ... }
(fx update)
setFoot(bool bFoot){ ... }
setActV(bool bActvV){ .. }
doTrig(int iTrig){ ... }
???
// ATTACK
doAimd(Vector3 aimdDir){ ... }
setAttk(bool bAttk){ ... }
an.attkST = cAnimn.eStateB.DN ;
setRapd(bool bRapd){ ... }
setPowr(bool bPowr){ ... }
// RADAR
setRadr(bool bRadar){ ... }
set__IO(bool b__IO ){ ... }
// io.On__IODelegate += set__IO ;
setStill(bool bStll ){ ... }
// an.OnStllDelegate += setStill ;
oEmitter.cs
//Bullet spawner/Turret
(misc)
HintBox/
oHint_ACTN.cs
//player event => jump...etc
oHint_CAMR.cs
//camera event => framing player and boss..etc
oHint_FLOK.cs
//flock logic
BulletObj/
oBullet_Slam.cs
//Thwomper, boss tentacle...etc
ToBeSpawnedComponents/
oAudio_Enable.cs
oRbody_Enable.cs
// WIP...
oFlameThrower_BB.cs
// Hack of flamethrower ability...need to integrate better
oEquip.cs
oFloater.cs
__gCONSTANT.cs
//shared functions and variables like level instance
public
static
class
__gIO{ ... }
//Project Global object to hold IO buttons
__gUtility{ ... }
public
static
T
AddComponent_mton<T>(GameObject IN_GO) where T:Component{ ... }
// Prevents duplicate components, checks to see that one doesn't already exist
GetCopyOf<T>(this Component comp, T other) where T : Component{ ... }
// Uses reflection for deep copy of any component
IEnumerator
WaitUntilDistantLess<T>(Transform IN_xform_SRC, Transform IN_xform_TGT, float In_threshold, Func<T> funcToRun){ ... }
void
CheckAndInitLayer(GameObject IN_GO, string IN_LAYERNAME){ ... }
__gEXTENSIONS.cs
Project
Layers