Skip to content

Commit

Permalink
doxygen implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Droog71 committed Sep 17, 2020
1 parent df49f22 commit 36ddbcc
Show file tree
Hide file tree
Showing 1,012 changed files with 125,688 additions and 465 deletions.
68 changes: 34 additions & 34 deletions ActionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ public class ActionManager
private PlayerController playerController;
private CombinedMeshManager meshManager;

//! This class contains all functions called by the input manager.
public ActionManager(PlayerController playerController)
{
this.playerController = playerController;
meshManager = playerController.gameManager.meshManager;
}

// Toggles the crosshair.
//! Toggles the crosshair.
public void ToggleCrosshair()
{
if (playerController.crosshairEnabled == true)
Expand All @@ -25,7 +26,7 @@ public void ToggleCrosshair()
playerController.PlayButtonSound();
}

// Toggles the head lamp.
//! Toggles the head lamp.
public void ToggleHeadLamp()
{
if (playerController.headlamp.GetComponent<Light>() != null)
Expand All @@ -42,7 +43,7 @@ public void ToggleHeadLamp()
playerController.PlayButtonSound();
}

// Toggles the laser cannon.
//! Toggles the laser cannon.
public void ToggleLaserCannon()
{
if (playerController.building == true || playerController.destroying == true)
Expand Down Expand Up @@ -79,7 +80,7 @@ public void ToggleLaserCannon()
}
}

// Toggles the scanner.
//! Toggles the scanner.
public void ToggleScanner()
{
if (playerController.building == true || playerController.destroying == true)
Expand Down Expand Up @@ -116,7 +117,7 @@ public void ToggleScanner()
}
}

// Toggles the paint gun.
//! Toggles the paint gun.
public void TogglePaintGun()
{
if (playerController.paintGunActive == false)
Expand Down Expand Up @@ -153,7 +154,7 @@ public void TogglePaintGun()
}
}

// Toggles the inventory GUI.
//! Toggles the inventory GUI.
public void ToggleInventory()
{
if (!playerController.GuiOpen())
Expand Down Expand Up @@ -192,7 +193,7 @@ public void ToggleInventory()
}
}

// Toggles the crafting GUI.
//! Toggles the crafting GUI.
public void ToggleCraftingGUI()
{
if (!playerController.GuiOpen())
Expand Down Expand Up @@ -232,7 +233,7 @@ public void ToggleCraftingGUI()
}
}

// Toggles the crafting GUI.
//! Toggles the crafting GUI.
public void ToggleMarketGUI()
{
if (!playerController.GuiOpen())
Expand Down Expand Up @@ -274,7 +275,7 @@ public void ToggleMarketGUI()
}
}

// Toggles the tablet GUI.
//! Toggles the tablet GUI.
public void ToggleTablet()
{
if (!playerController.GuiOpen())
Expand Down Expand Up @@ -308,7 +309,7 @@ public void ToggleTablet()
}
}

// Moves the player forward.
//! Moves the player forward.
public void WalkForward()
{
if (!Physics.Raycast(playerController.mCam.gameObject.transform.position, playerController.mCam.gameObject.transform.forward, out RaycastHit hit, 5))
Expand All @@ -326,7 +327,7 @@ public void WalkForward()
}
}

// Moves the player backward.
//! Moves the player backward.
public void WalkBackward()
{
if (!Physics.Raycast(playerController.mCam.gameObject.transform.position, -playerController.mCam.gameObject.transform.forward, out RaycastHit hit, 5))
Expand All @@ -336,7 +337,7 @@ public void WalkBackward()
}
}

// Moves the player left.
//! Moves the player left.
public void StrafeLeft()
{
if (!Physics.Raycast(playerController.mCam.gameObject.transform.position, -playerController.mCam.gameObject.transform.right, out RaycastHit hit, 5))
Expand All @@ -345,7 +346,7 @@ public void StrafeLeft()
}
}

// Moves the player right.
//! Moves the player right.
public void StrafeRight()
{
if (!Physics.Raycast(playerController.mCam.gameObject.transform.position, playerController.mCam.gameObject.transform.right, out RaycastHit hit, 5))
Expand All @@ -354,7 +355,7 @@ public void StrafeRight()
}
}

// Returns true when the player is walking on metal.
//! Returns true when the player is walking on metal.
private bool OnMetal(RaycastHit hit)
{
return hit.collider.gameObject.GetComponent<IronBlock>() != null
Expand All @@ -363,7 +364,7 @@ private bool OnMetal(RaycastHit hit)
|| hit.collider.gameObject.name.Equals("steelHolder(Clone)");
}

// Returns true when varied footstep sounds should loop back to the first sound.
//! Returns true when varied footstep sounds should loop back to the first sound.
private bool InitMetalStepSounds()
{
return playerController.playerBody.GetComponent<AudioSource>().clip == playerController.footStep1
Expand All @@ -373,7 +374,7 @@ private bool InitMetalStepSounds()
|| playerController.playerBody.GetComponent<AudioSource>().clip == playerController.metalFootStep1;
}

// Returns true when varied footstep sounds should loop back to the first sound.
//! Returns true when varied footstep sounds should loop back to the first sound.
private bool InitGroundStepSounds()
{
return playerController.playerBody.GetComponent<AudioSource>().clip == playerController.footStep1
Expand All @@ -383,13 +384,13 @@ private bool InitGroundStepSounds()
|| playerController.playerBody.GetComponent<AudioSource>().clip == playerController.metalFootStep4;
}

// Handles head bob, held item movement and footstep sound effects.
//! Handles head bob, held item movement and footstep sound effects.
public void DoGroundEffects(RaycastHit hit)
{
// HEAD BOB
//HEAD BOB
playerController.mCam.GetComponent<HeadBob>().active = true;

// HELD OBJECT MOVEMENT
//HELD OBJECT MOVEMENT
if (playerController.gameObject.GetComponent<AudioSource>().isPlaying == true)
{
playerController.gameObject.GetComponent<AudioSource>().Stop();
Expand Down Expand Up @@ -419,7 +420,7 @@ public void DoGroundEffects(RaycastHit hit)
playerController.paintGun.GetComponent<HeldItemSway>().active = false;
}

// FOOTSTEP SOUNDS
//FOOTSTEP SOUNDS
playerController.footStepTimer += 1 * Time.deltaTime;
if (playerController.footStepTimer >= playerController.footStepSoundFrquency)
{
Expand Down Expand Up @@ -473,7 +474,7 @@ public void DoGroundEffects(RaycastHit hit)
}
}

// Stops head bob and held item movement.
//! Stops head bob and held item movement.
public void StopGroundEffects()
{
playerController.mCam.GetComponent<HeadBob>().active = false;
Expand All @@ -482,7 +483,7 @@ public void StopGroundEffects()
playerController.paintGun.GetComponent<HeldItemSway>().active = false;
}

// Resets the held item's position.
//! Resets the held item's position.
public void ResetHeldItemSway()
{
if (playerController.scannerActive == true)
Expand All @@ -499,7 +500,7 @@ public void ResetHeldItemSway()
}
}

// Fires the laser cannon.
//! Fires the laser cannon.
public void FireLaserCannon()
{
if (playerController.firing == false)
Expand All @@ -515,7 +516,7 @@ public void FireLaserCannon()
}
}

// Sends out a ping with the scanner.
//! Sends out a ping with the scanner.
public void ScannerPing()
{
if (playerController.scanning == false)
Expand Down Expand Up @@ -583,7 +584,7 @@ public void ScannerPing()
}
}

// Applies jetpack thrust.
//! Applies jetpack thrust.
public void JetPackThrust()
{
if (playerController.gameObject.GetComponent<AudioSource>().isPlaying == false)
Expand All @@ -600,7 +601,7 @@ public void JetPackThrust()
playerController.paintGun.GetComponent<HeldItemSway>().active = false;
}

// Increases the number of blocks to be built along the build axis.
//! Increases the number of blocks to be built along the build axis.
public void IncreaseBuildAmount()
{
playerController.buildIncrementTimer += 1 * Time.deltaTime;
Expand All @@ -614,7 +615,7 @@ public void IncreaseBuildAmount()
}
}

// Reduces the number of blocks to be built along the build axis.
//! Reduces the number of blocks to be built along the build axis.
public void DecreaseBuildAmount()
{
playerController.buildIncrementTimer += 1 * Time.deltaTime;
Expand All @@ -628,7 +629,7 @@ public void DecreaseBuildAmount()
}
}

// Starts build mode, for placing blocks.
//! Starts build mode, for placing blocks.
public void StartBuildMode()
{
if (!playerController.GuiOpen())
Expand Down Expand Up @@ -669,7 +670,7 @@ public void StartBuildMode()
}
}

// Stops building mode.
//! Stops building mode.
public void StopBuilding()
{
if (playerController.building == true)
Expand All @@ -695,7 +696,7 @@ public void StopBuilding()
}
}

// Closes machine GUI.
//! Closes machine GUI.
public void CloseMachineGUI()
{
if (playerController.building == true || playerController.destroying == true)
Expand All @@ -721,7 +722,7 @@ public void CloseMachineGUI()
playerController.machineGUIopen = false;
}

// Closes tablet GUI.
//! Closes tablet GUI.
public void CloseTablet()
{
if (playerController.building == true || playerController.destroying == true)
Expand All @@ -747,7 +748,7 @@ public void CloseTablet()
playerController.tabletOpen = false;
}

// Closes all GUI windows.
//! Closes all GUI windows.
public void CloseMenus()
{
playerController.ApplySettings();
Expand All @@ -764,5 +765,4 @@ public void CloseMenus()
playerController.videoMenuOpen = false;
playerController.schematicMenuOpen = false;
}
}

}
3 changes: 2 additions & 1 deletion AddressManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ public class AddressManager
{
private StateManager stateManager;

//! This class assigns a unique ID to every block in the world.
public AddressManager(StateManager stateManager)
{
this.stateManager = stateManager;
}

// Assigns ID to all objects in the world.
//! Assigns ID to all objects in the world.
public IEnumerator AddressingCoroutine()
{
stateManager.assigningIDs = true;
Expand Down
8 changes: 4 additions & 4 deletions AirLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class AirLock : MonoBehaviour
public GameObject closedObject;
public GameObject effects;

// Called by unity engine on start up to initialize variables
//! Called by unity engine on start up to initialize variables.
public void Start()
{
if (QualitySettings.GetQualityLevel() < 3)
Expand All @@ -19,7 +19,7 @@ public void Start()
}
}

// Called once per frame by unity engine
//! Called once per frame by unity engine.
public void Update()
{
updateTick += 1 * Time.deltaTime;
Expand All @@ -30,7 +30,7 @@ public void Update()
}
}

// Toggle the open or closed state of the hatchway
//! Toggle the open or closed state of the hatchway.
public void ToggleOpen()
{
if (open == false)
Expand All @@ -48,4 +48,4 @@ public void ToggleOpen()
open = false;
}
}
}
}
Loading

0 comments on commit 36ddbcc

Please sign in to comment.