doxygen implementation
This commit is contained in:
parent
df49f225d6
commit
36ddbcc57b
@ -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)
|
||||
@ -25,7 +26,7 @@ public class ActionManager
|
||||
playerController.PlayButtonSound();
|
||||
}
|
||||
|
||||
// Toggles the head lamp.
|
||||
//! Toggles the head lamp.
|
||||
public void ToggleHeadLamp()
|
||||
{
|
||||
if (playerController.headlamp.GetComponent<Light>() != null)
|
||||
@ -42,7 +43,7 @@ public class ActionManager
|
||||
playerController.PlayButtonSound();
|
||||
}
|
||||
|
||||
// Toggles the laser cannon.
|
||||
//! Toggles the laser cannon.
|
||||
public void ToggleLaserCannon()
|
||||
{
|
||||
if (playerController.building == true || playerController.destroying == true)
|
||||
@ -79,7 +80,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Toggles the scanner.
|
||||
//! Toggles the scanner.
|
||||
public void ToggleScanner()
|
||||
{
|
||||
if (playerController.building == true || playerController.destroying == true)
|
||||
@ -116,7 +117,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Toggles the paint gun.
|
||||
//! Toggles the paint gun.
|
||||
public void TogglePaintGun()
|
||||
{
|
||||
if (playerController.paintGunActive == false)
|
||||
@ -153,7 +154,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Toggles the inventory GUI.
|
||||
//! Toggles the inventory GUI.
|
||||
public void ToggleInventory()
|
||||
{
|
||||
if (!playerController.GuiOpen())
|
||||
@ -192,7 +193,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Toggles the crafting GUI.
|
||||
//! Toggles the crafting GUI.
|
||||
public void ToggleCraftingGUI()
|
||||
{
|
||||
if (!playerController.GuiOpen())
|
||||
@ -232,7 +233,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Toggles the crafting GUI.
|
||||
//! Toggles the crafting GUI.
|
||||
public void ToggleMarketGUI()
|
||||
{
|
||||
if (!playerController.GuiOpen())
|
||||
@ -274,7 +275,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Toggles the tablet GUI.
|
||||
//! Toggles the tablet GUI.
|
||||
public void ToggleTablet()
|
||||
{
|
||||
if (!playerController.GuiOpen())
|
||||
@ -308,7 +309,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// 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))
|
||||
@ -326,7 +327,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// 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))
|
||||
@ -336,7 +337,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// 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))
|
||||
@ -345,7 +346,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// 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))
|
||||
@ -354,7 +355,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
@ -363,7 +364,7 @@ public class ActionManager
|
||||
|| 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
|
||||
@ -373,7 +374,7 @@ public class ActionManager
|
||||
|| 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
|
||||
@ -383,13 +384,13 @@ public class ActionManager
|
||||
|| 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();
|
||||
@ -419,7 +420,7 @@ public class ActionManager
|
||||
playerController.paintGun.GetComponent<HeldItemSway>().active = false;
|
||||
}
|
||||
|
||||
// FOOTSTEP SOUNDS
|
||||
//FOOTSTEP SOUNDS
|
||||
playerController.footStepTimer += 1 * Time.deltaTime;
|
||||
if (playerController.footStepTimer >= playerController.footStepSoundFrquency)
|
||||
{
|
||||
@ -473,7 +474,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Stops head bob and held item movement.
|
||||
//! Stops head bob and held item movement.
|
||||
public void StopGroundEffects()
|
||||
{
|
||||
playerController.mCam.GetComponent<HeadBob>().active = false;
|
||||
@ -482,7 +483,7 @@ public class ActionManager
|
||||
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)
|
||||
@ -499,7 +500,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Fires the laser cannon.
|
||||
//! Fires the laser cannon.
|
||||
public void FireLaserCannon()
|
||||
{
|
||||
if (playerController.firing == false)
|
||||
@ -515,7 +516,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Sends out a ping with the scanner.
|
||||
//! Sends out a ping with the scanner.
|
||||
public void ScannerPing()
|
||||
{
|
||||
if (playerController.scanning == false)
|
||||
@ -583,7 +584,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Applies jetpack thrust.
|
||||
//! Applies jetpack thrust.
|
||||
public void JetPackThrust()
|
||||
{
|
||||
if (playerController.gameObject.GetComponent<AudioSource>().isPlaying == false)
|
||||
@ -600,7 +601,7 @@ public class ActionManager
|
||||
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;
|
||||
@ -614,7 +615,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
@ -628,7 +629,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Starts build mode, for placing blocks.
|
||||
//! Starts build mode, for placing blocks.
|
||||
public void StartBuildMode()
|
||||
{
|
||||
if (!playerController.GuiOpen())
|
||||
@ -669,7 +670,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Stops building mode.
|
||||
//! Stops building mode.
|
||||
public void StopBuilding()
|
||||
{
|
||||
if (playerController.building == true)
|
||||
@ -695,7 +696,7 @@ public class ActionManager
|
||||
}
|
||||
}
|
||||
|
||||
// Closes machine GUI.
|
||||
//! Closes machine GUI.
|
||||
public void CloseMachineGUI()
|
||||
{
|
||||
if (playerController.building == true || playerController.destroying == true)
|
||||
@ -721,7 +722,7 @@ public class ActionManager
|
||||
playerController.machineGUIopen = false;
|
||||
}
|
||||
|
||||
// Closes tablet GUI.
|
||||
//! Closes tablet GUI.
|
||||
public void CloseTablet()
|
||||
{
|
||||
if (playerController.building == true || playerController.destroying == true)
|
||||
@ -747,7 +748,7 @@ public class ActionManager
|
||||
playerController.tabletOpen = false;
|
||||
}
|
||||
|
||||
// Closes all GUI windows.
|
||||
//! Closes all GUI windows.
|
||||
public void CloseMenus()
|
||||
{
|
||||
playerController.ApplySettings();
|
||||
@ -764,5 +765,4 @@ public class ActionManager
|
||||
playerController.videoMenuOpen = false;
|
||||
playerController.schematicMenuOpen = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
|
@ -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)
|
||||
@ -19,7 +19,7 @@ public class AirLock : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -30,7 +30,7 @@ public class AirLock : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle the open or closed state of the hatchway
|
||||
//! Toggle the open or closed state of the hatchway.
|
||||
public void ToggleOpen()
|
||||
{
|
||||
if (open == false)
|
||||
@ -48,4 +48,4 @@ public class AirLock : MonoBehaviour
|
||||
open = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -35,7 +35,7 @@ public class AlloySmelter : MonoBehaviour
|
||||
private int machineTimer;
|
||||
private GameObject builtObjects;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
@ -49,7 +49,7 @@ public class AlloySmelter : MonoBehaviour
|
||||
conduitItem = GetComponentInChildren<ConduitItem>(true);
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -125,7 +125,7 @@ public class AlloySmelter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! Returns true if the object exists, is active and is not a standard building block.
|
||||
bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -135,13 +135,13 @@ public class AlloySmelter : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// The object is a potential output connection
|
||||
//! The object is a potential output connection.
|
||||
bool IsValidOutputObject(GameObject obj)
|
||||
{
|
||||
return outputObject == null && inputObject1 != null && inputObject2 != null && obj != inputObject1 && obj != inputObject2 && obj != gameObject;
|
||||
}
|
||||
|
||||
// Finds a universal conduit to use as an output
|
||||
//! Finds a universal conduit to use as an output.
|
||||
private void GetOutputConduit()
|
||||
{
|
||||
GameObject[] allObjects = GameObject.FindGameObjectsWithTag("Built");
|
||||
@ -182,7 +182,7 @@ public class AlloySmelter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Consumes input items and produces an item for output
|
||||
//! Consumes input items and produces an item for output.
|
||||
private void SmeltAlloy()
|
||||
{
|
||||
if (inputObject1.GetComponent<UniversalConduit>() != null && inputObject2.GetComponent<UniversalConduit>() != null)
|
||||
@ -289,7 +289,7 @@ public class AlloySmelter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Items are moved to output conduit, sounds and special effects are created
|
||||
//! Items are moved to output conduit, sounds and special effects are created.
|
||||
private void OutputToConduit()
|
||||
{
|
||||
if (outputObject != null)
|
||||
@ -351,7 +351,7 @@ public class AlloySmelter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
|
6
Auger.cs
6
Auger.cs
@ -21,7 +21,7 @@ public class Auger : MonoBehaviour
|
||||
private float updateTick;
|
||||
private int machineTimer;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
@ -34,7 +34,7 @@ public class Auger : MonoBehaviour
|
||||
connectionLine.enabled = false;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -94,7 +94,7 @@ public class Auger : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
|
@ -4,7 +4,7 @@ public class AugerBlade : MonoBehaviour
|
||||
{
|
||||
public GameObject auger;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (auger.GetComponent<AudioSource>().enabled == true)
|
||||
|
@ -28,7 +28,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
private CraftingDictionary craftingDictionary;
|
||||
private GameObject builtObjects;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
craftingManager = GetComponent<CraftingManager>();
|
||||
@ -44,7 +44,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
conduitItem = GetComponentInChildren<ConduitItem>(true);
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -140,7 +140,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
@ -149,7 +149,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
powerObject = powerReceiver.powerObject;
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! Returns true if the object exists, is active and is not a standard building block.
|
||||
bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -169,7 +169,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
&& obj.GetComponent<AutoCrafter>() == null;
|
||||
}
|
||||
|
||||
// Connects the auto crafter to a storage inventory
|
||||
//! Connects the auto crafter to a storage inventory.
|
||||
private void ConnectToObject(GameObject obj)
|
||||
{
|
||||
if (inputObject == null && IsStorageContainer(obj))
|
||||
@ -239,7 +239,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Calls the appropriate item crafting method in the crafting manager
|
||||
//! Calls the appropriate item crafting method in the crafting manager.
|
||||
private void CraftItems(bool usingStorageComputer)
|
||||
{
|
||||
if (usingStorageComputer)
|
||||
@ -258,7 +258,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Handles overall operation of the machine
|
||||
//! Handles overall operation of the machine.
|
||||
private void DoWork()
|
||||
{
|
||||
float distance = Vector3.Distance(transform.position, inputObject.transform.position);
|
||||
@ -339,7 +339,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called when all requirements are met for the machine to be running, activates effects
|
||||
//! Called when all requirements are met for the machine to be running, activates effects.
|
||||
private void Activate()
|
||||
{
|
||||
conduitItem.active = true;
|
||||
@ -352,7 +352,7 @@ public class AutoCrafter : MonoBehaviour
|
||||
connectionLine.SetPosition(1, inputObject.transform.position);
|
||||
}
|
||||
|
||||
// Called when requirements are not met for the machine to be running, disables effects
|
||||
//! Called when requirements are not met for the machine to be running, disables effects.
|
||||
private void ShutDown(bool disconnect)
|
||||
{
|
||||
if (craftingManager.conduitItem != null)
|
||||
|
@ -30,7 +30,7 @@ public class BasicMachine : MonoBehaviour
|
||||
private GameObject builtObjects;
|
||||
private int machineTimer;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
@ -44,7 +44,7 @@ public class BasicMachine : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -126,7 +126,7 @@ public class BasicMachine : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! The object exists, is active and is not a standard building block.
|
||||
private bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -136,13 +136,13 @@ public class BasicMachine : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// The object is a potential output connection
|
||||
//! The object is a potential output connection.
|
||||
private bool IsValidOutputObject(GameObject obj)
|
||||
{
|
||||
return outputObject == null && inputObject != null && obj != inputObject && obj != gameObject;
|
||||
}
|
||||
|
||||
// Finds and connects to a universal conduit for output
|
||||
//! Finds and connects to a universal conduit for output.
|
||||
private void ConnectToOutput()
|
||||
{
|
||||
GameObject[] allObjects = GameObject.FindGameObjectsWithTag("Built");
|
||||
@ -183,7 +183,7 @@ public class BasicMachine : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Sets the appropriate output item according to the input
|
||||
//! Sets the appropriate output item according to the input.
|
||||
private string GetOutputType()
|
||||
{
|
||||
string incoming = inputObject.GetComponent<UniversalConduit>().type;
|
||||
@ -204,7 +204,7 @@ public class BasicMachine : MonoBehaviour
|
||||
return "nothing";
|
||||
}
|
||||
|
||||
// If everything is working, items are moved to the output conduit; sounds and other effects are enabled.
|
||||
//! If everything is working, items are moved to the output conduit; sounds and other effects are enabled.
|
||||
private void HandleOutput()
|
||||
{
|
||||
if (outputObject != null)
|
||||
@ -241,9 +241,8 @@ public class BasicMachine : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else // Reset the output connection, allow new connections to be made.
|
||||
{
|
||||
// Reset the output connection, allow new connections to be made
|
||||
connectionLine.enabled = false;
|
||||
if (connectionFailed == true)
|
||||
{
|
||||
@ -255,7 +254,7 @@ public class BasicMachine : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
|
@ -3,6 +3,7 @@
|
||||
public string input;
|
||||
public string output;
|
||||
|
||||
//! Single input and output recipe used for basic machines.
|
||||
public BasicMachineRecipe(string input, string output)
|
||||
{
|
||||
this.input = input;
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
//This class contains GameObject dictionaries for easily referencing different machines and other blocks
|
||||
//! This class contains GameObject dictionaries for easily referencing different machines and other blocks.
|
||||
public class BlockDictionary
|
||||
{
|
||||
private PlayerController playerController;
|
||||
@ -18,7 +18,7 @@ public class BlockDictionary
|
||||
Init();
|
||||
}
|
||||
|
||||
// Gets description for a specfic machine.
|
||||
//! Gets description for a specfic machine.
|
||||
public string GetMachineDescription(string machineName)
|
||||
{
|
||||
string modPath = Path.Combine(Application.persistentDataPath, "Mods");
|
||||
@ -43,7 +43,7 @@ public class BlockDictionary
|
||||
return null;
|
||||
}
|
||||
|
||||
// Gets recipes for a specfic machine.
|
||||
//! Gets recipes for a specfic machine.
|
||||
public BasicMachineRecipe[] GetMachineRecipes(string machineName)
|
||||
{
|
||||
string modPath = Path.Combine(Application.persistentDataPath, "Mods");
|
||||
@ -77,7 +77,7 @@ public class BlockDictionary
|
||||
return null;
|
||||
}
|
||||
|
||||
// Adds machines from mods to the game.
|
||||
//! Adds machines from mods to the game.
|
||||
public void AddModMachines(Dictionary<string, GameObject> dictionary)
|
||||
{
|
||||
string modPath = Path.Combine(Application.persistentDataPath, "Mods");
|
||||
@ -104,7 +104,7 @@ public class BlockDictionary
|
||||
}
|
||||
}
|
||||
|
||||
// Initializes variables.
|
||||
//! Initializes variables.
|
||||
private void Init()
|
||||
{
|
||||
blockDictionary = new Dictionary<string, GameObject>
|
||||
|
@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
// This class is attached to placeholder objects identified through Unity's GetComponent method.
|
||||
//! This class is attached to placeholder objects identified through Unity's GetComponent method.
|
||||
public class BlockDummy : MonoBehaviour
|
||||
{
|
||||
public string type;
|
||||
|
@ -5,13 +5,14 @@ public class BlockInteraction
|
||||
private PlayerController playerController;
|
||||
private InteractionController interactionController;
|
||||
|
||||
//! This class handles the player's interactions with standard building blocks.
|
||||
public BlockInteraction(PlayerController playerController, InteractionController interactionController)
|
||||
{
|
||||
this.playerController = playerController;
|
||||
this.interactionController = interactionController;
|
||||
}
|
||||
|
||||
// Called once per frame when the player is looking at an iron block.
|
||||
//! Called once per frame when the player is looking at an iron block.
|
||||
public void InteractWithIronBlock()
|
||||
{
|
||||
if (cInput.GetKeyDown("Collect Object"))
|
||||
@ -31,7 +32,7 @@ public class BlockInteraction
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame when the player is looking at a steel block.
|
||||
//! Called once per frame when the player is looking at a steel block.
|
||||
public void InteractWithSteelBlock()
|
||||
{
|
||||
if (cInput.GetKeyDown("Collect Object"))
|
||||
@ -50,7 +51,7 @@ public class BlockInteraction
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame when the player is looking at a glass block.
|
||||
//! Called once per frame when the player is looking at a glass block.
|
||||
public void InteractWithGlass()
|
||||
{
|
||||
if (cInput.GetKeyDown("Collect Object"))
|
||||
@ -59,7 +60,7 @@ public class BlockInteraction
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame when the player is looking at a brick block.
|
||||
//! Called once per frame when the player is looking at a brick block.
|
||||
public void InteractWithBricks()
|
||||
{
|
||||
if (cInput.GetKeyDown("Collect Object"))
|
||||
@ -68,7 +69,7 @@ public class BlockInteraction
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame when the player is looking at a combined mesh object.
|
||||
//! Called once per frame when the player is looking at a combined mesh object.
|
||||
public void InteractWithCombinedMesh()
|
||||
{
|
||||
playerController.lookingAtCombinedMesh = true;
|
||||
|
@ -4,6 +4,7 @@
|
||||
public string[] objectNames;
|
||||
private int selection;
|
||||
|
||||
//! This class handles the building block selection at the top right corner of the screen.
|
||||
public BlockSelector(PlayerController playerController)
|
||||
{
|
||||
this.playerController = playerController;
|
||||
@ -43,7 +44,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
// Applies changes.
|
||||
//! Applies changes.
|
||||
private void SetSelection()
|
||||
{
|
||||
playerController.buildType = objectNames[selection];
|
||||
@ -56,14 +57,14 @@
|
||||
playerController.PlayButtonSound();
|
||||
}
|
||||
|
||||
// Changes the currently selected building block.
|
||||
//! Changes the currently selected building block.
|
||||
public void NextBlock()
|
||||
{
|
||||
selection = selection < objectNames.Length - 1 ? selection + 1 : 0;
|
||||
SetSelection();
|
||||
}
|
||||
|
||||
// Changes the currently selected building block.
|
||||
//! Changes the currently selected building block.
|
||||
public void PreviousBlock()
|
||||
{
|
||||
selection = selection > 0 ? selection - 1 : objectNames.Length - 1;
|
||||
|
3
Brick.cs
3
Brick.cs
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class is attached to all brick block prefabs.
|
||||
public class Brick : MonoBehaviour
|
||||
{
|
||||
public string ID = "unassigned";
|
||||
@ -7,7 +8,7 @@ public class Brick : MonoBehaviour
|
||||
public int address;
|
||||
private float updateTick;
|
||||
|
||||
// Called once per frame by unity engine.
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
|
@ -10,7 +10,7 @@ public class BuildController : MonoBehaviour
|
||||
public GameObject builtObjects;
|
||||
public bool autoAxis;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
@ -19,7 +19,7 @@ public class BuildController : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine
|
||||
public void Update()
|
||||
{
|
||||
if (playerController.building == true)
|
||||
@ -132,7 +132,7 @@ public class BuildController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Creates the block placement cursor.
|
||||
//! Creates the block placement cursor.
|
||||
private void CreateBuildObject()
|
||||
{
|
||||
playerController.buildObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
|
||||
@ -153,7 +153,7 @@ public class BuildController : MonoBehaviour
|
||||
dirLine.enabled = true;
|
||||
}
|
||||
|
||||
// Automatically selects build axis based on raycast.
|
||||
//! Automatically selects build axis based on raycast.
|
||||
private void AutoSelectBuildAxis(RaycastHit buildHit)
|
||||
{
|
||||
Vector3 hitPoint = buildHit.point;
|
||||
@ -200,7 +200,7 @@ public class BuildController : MonoBehaviour
|
||||
playerController.buildTimer = 0;
|
||||
}
|
||||
|
||||
// Changes the axis along which blocks will be placed.
|
||||
//! Changes the axis along which blocks will be placed.
|
||||
public void ChangeBuildAxis()
|
||||
{
|
||||
if (playerController.cubeloc == "up")
|
||||
@ -232,7 +232,7 @@ public class BuildController : MonoBehaviour
|
||||
playerController.buildTimer = 0;
|
||||
}
|
||||
|
||||
// Implements the current build axis.
|
||||
//! Implements the current build axis.
|
||||
private void SetupBuildAxis(RaycastHit hit)
|
||||
{
|
||||
Vector3 placementPoint = hit.transform.position;
|
||||
@ -272,7 +272,7 @@ public class BuildController : MonoBehaviour
|
||||
dirLine.SetPosition(1, dirVector);
|
||||
}
|
||||
|
||||
// Prepares cursor for free block placement, ie: not attached to another block.
|
||||
//! Prepares cursor for free block placement, ie: not attached to another block.
|
||||
private void SetupFreePlacement(RaycastHit hit)
|
||||
{
|
||||
Vector3 placementPoint = new Vector3(hit.point.x, (hit.point.y + 2.4f), hit.point.z);
|
||||
@ -284,7 +284,7 @@ public class BuildController : MonoBehaviour
|
||||
dirLine.SetPosition(1, dirVector);
|
||||
}
|
||||
|
||||
// Places a machine in the world.
|
||||
//! Places a machine in the world.
|
||||
private void BuildMachine(string type, RaycastHit hit)
|
||||
{
|
||||
bool foundItems = false;
|
||||
@ -369,7 +369,7 @@ public class BuildController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Places standard building blocks in the world.
|
||||
//! Places standard building blocks in the world.
|
||||
private void BuildBlock(string type)
|
||||
{
|
||||
bool foundItems = false;
|
||||
@ -447,6 +447,4 @@ public class BuildController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -6,12 +6,17 @@ public class CombinedMeshManager
|
||||
{
|
||||
private GameManager gameManager;
|
||||
|
||||
//! The Combined Mesh Manager handles all combined meshes for building blocks.
|
||||
//! All standard building blocks are stored in combined meshes after being placed.
|
||||
//! Parts of the combined mesh are converted to individual blocks when edited by the player.
|
||||
//! Meteor strikes and weapons also cause small sections of the combined mesh to separate.
|
||||
//! The combined mesh is refactored after changes occur.
|
||||
public CombinedMeshManager(GameManager gameManager)
|
||||
{
|
||||
this.gameManager = gameManager;
|
||||
}
|
||||
|
||||
// Separates combined meshes into blocks
|
||||
//! Separates combined meshes into blocks
|
||||
public void SeparateBlocks(Vector3 target, string type, bool building)
|
||||
{
|
||||
if (gameManager.working == false && gameManager.GetComponent<StateManager>().saving == false)
|
||||
@ -34,7 +39,7 @@ public class CombinedMeshManager
|
||||
}
|
||||
}
|
||||
|
||||
// Separates combined meshes into blocks
|
||||
//! Separates combined meshes into blocks
|
||||
private IEnumerator BlockSeparationCoroutine(Vector3 target, string type)
|
||||
{
|
||||
if (target != null)
|
||||
@ -292,7 +297,7 @@ public class CombinedMeshManager
|
||||
}
|
||||
}
|
||||
|
||||
// Creates combined meshes from placed building blocks
|
||||
//! Creates combined meshes from placed building blocks.
|
||||
public void CombineBlocks()
|
||||
{
|
||||
if (gameManager.working == false && gameManager.GetComponent<StateManager>().saving == false)
|
||||
@ -508,11 +513,13 @@ public class CombinedMeshManager
|
||||
}
|
||||
}
|
||||
|
||||
//! Starts the combined mesh coroutine.
|
||||
public void CombineMeshes()
|
||||
{
|
||||
gameManager.combineCoroutine = gameManager.StartCoroutine(CombineMeshCoroutine());
|
||||
}
|
||||
|
||||
//! Creates combined meshes from blocks placed in the world.
|
||||
private IEnumerator CombineMeshCoroutine()
|
||||
{
|
||||
if (gameManager.ironMeshRequired == true)
|
||||
|
@ -1,5 +1,4 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class ConduitItem : MonoBehaviour
|
||||
@ -12,11 +11,13 @@ public class ConduitItem : MonoBehaviour
|
||||
public GameObject billboard2;
|
||||
public bool active;
|
||||
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
startPosition = transform.position;
|
||||
}
|
||||
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (active == true && textureDictionary != null)
|
||||
|
@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
// This class provides the crafting recipe dictionary used by the crafting manager
|
||||
//! This class provides the crafting recipe dictionary used by the crafting manager
|
||||
public class CraftingDictionary
|
||||
{
|
||||
public Dictionary<string, CraftingRecipe> dictionary;
|
||||
@ -108,7 +108,7 @@ public class CraftingDictionary
|
||||
AddModRecipes();
|
||||
}
|
||||
|
||||
// Gets mod recipes from file.
|
||||
//! Gets mod recipes from file.
|
||||
public void AddModRecipes()
|
||||
{
|
||||
modDictionary = new Dictionary<string, CraftingRecipe>();
|
||||
|
@ -8,13 +8,13 @@ public class CraftingManager : MonoBehaviour
|
||||
public ConduitItem conduitItem;
|
||||
public bool missingItem;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
}
|
||||
|
||||
// Used to disable the conduit item if this block is destroyed
|
||||
//! Used to disable the conduit item if this block is destroyed.
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (conduitItem != null)
|
||||
@ -23,7 +23,7 @@ public class CraftingManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the player crafts an item from the inventory GUI
|
||||
//! Called when the player crafts an item from the inventory GUI.
|
||||
public void CraftItemAsPlayer(CraftingRecipe recipe)
|
||||
{
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
@ -87,7 +87,7 @@ public class CraftingManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called by the auto crafter when it is connected to a storage container
|
||||
//! Called by the auto crafter when it is connected to a storage container.
|
||||
public void CraftItemUsingStorageContainer(CraftingRecipe recipe)
|
||||
{
|
||||
InventorySlot[] slots = new InventorySlot[recipe.ingredients.Length];
|
||||
@ -137,7 +137,7 @@ public class CraftingManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called by the auto crafter when it is connected to a storage computer
|
||||
//! Called by the auto crafter when it is connected to a storage computer.
|
||||
public void CraftItemUsingStorageComputer(CraftingRecipe recipe)
|
||||
{
|
||||
InventorySlot[] slots = new InventorySlot[recipe.ingredients.Length];
|
||||
|
@ -5,6 +5,8 @@
|
||||
public string output;
|
||||
public int outputAmount;
|
||||
|
||||
//! Crafting recipes are used by both the player and the auto crafter machine.
|
||||
//! Ingredients and their amounts should be stored at the same index in their respective arrays.
|
||||
public CraftingRecipe(string[] ingredients, int[] amounts, string output, int outputAmount)
|
||||
{
|
||||
this.ingredients = ingredients;
|
||||
|
@ -5,7 +5,7 @@ public class DarkMatter: MonoBehaviour
|
||||
private float size;
|
||||
public GameObject collector;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine
|
||||
public void Update()
|
||||
{
|
||||
if (size < 10)
|
||||
|
@ -26,7 +26,7 @@ public class DarkMatterCollector : MonoBehaviour
|
||||
public bool foundDarkMatter;
|
||||
private GameObject builtObjects;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
private void Start()
|
||||
{
|
||||
connectionLine = gameObject.AddComponent<LineRenderer>();
|
||||
@ -40,7 +40,7 @@ public class DarkMatterCollector : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -128,7 +128,7 @@ public class DarkMatterCollector : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Used to remove the connection line renderer when the block is destroyed
|
||||
//! Used to remove the connection line renderer when the block is destroyed.
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (inputLine != null)
|
||||
@ -137,7 +137,7 @@ public class DarkMatterCollector : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! The object exists, is active and is not a standard building block.
|
||||
bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -147,7 +147,7 @@ public class DarkMatterCollector : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Finds a dark matter source node to harvest
|
||||
//! Finds a dark matter source node to harvest.
|
||||
private void FindDarkMatter()
|
||||
{
|
||||
DarkMatter[] allDarkMatter = FindObjectsOfType<DarkMatter>();
|
||||
@ -181,7 +181,7 @@ public class DarkMatterCollector : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
|
@ -25,7 +25,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
public ConduitItem storageComputerConduitItem;
|
||||
private GameObject builtObjects;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
connectionLine = gameObject.AddComponent<LineRenderer>();
|
||||
@ -38,7 +38,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -82,7 +82,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Used to remove conduit item from storage computer if connected to one
|
||||
//! Used to remove conduit item from storage computer if connected to one.
|
||||
void OnDestroy()
|
||||
{
|
||||
if (storageComputerConduitItem != null)
|
||||
@ -91,7 +91,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! The object exists, is active and is not a standard building block.
|
||||
bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -101,13 +101,13 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// The object is a potential output connection
|
||||
//! The object is a potential output connection.
|
||||
bool IsValidOutputObject(GameObject obj)
|
||||
{
|
||||
return outputObject == null && inputObject != null && obj != inputObject && obj != gameObject;
|
||||
}
|
||||
|
||||
// Returns true if the object is a storage container
|
||||
//! Returns true if the object is a storage container.
|
||||
private bool IsStorageContainer(GameObject obj)
|
||||
{
|
||||
if (obj.GetComponent<InventoryManager>() != null)
|
||||
@ -117,7 +117,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Makes connections to collectors and other conduits
|
||||
//! Makes connections to collectors and other conduits.
|
||||
private void FindConnections()
|
||||
{
|
||||
GameObject[] allObjects = GameObject.FindGameObjectsWithTag("Built");
|
||||
@ -234,7 +234,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets values from input object and calls HandleOutput
|
||||
//! Gets values from input object and calls HandleOutput.
|
||||
private void HandleIO()
|
||||
{
|
||||
if (inputObject != null)
|
||||
@ -286,7 +286,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
HandleOutput();
|
||||
}
|
||||
|
||||
// Moves dark matter to the output object
|
||||
//! Moves dark matter to the output object.
|
||||
private void HandleOutput()
|
||||
{
|
||||
if (outputObject != null)
|
||||
@ -327,6 +327,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Moves dark matter from the conduit to a storage computer.
|
||||
private void OutputToStorageComputer()
|
||||
{
|
||||
outputID = outputObject.GetComponent<StorageComputer>().ID;
|
||||
@ -385,6 +386,7 @@ public class DarkMatterConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Moves dark matter to a storage container.
|
||||
private void OutputToInventory()
|
||||
{
|
||||
if (outputObject.GetComponent<RailCart>() != null)
|
||||
|
@ -10,13 +10,13 @@ public class ElectricLight : MonoBehaviour
|
||||
public GameObject powerObject;
|
||||
public PowerReceiver powerReceiver;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -37,7 +37,7 @@ public class ElectricLight : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
|
@ -4,7 +4,7 @@ public class Explosion : MonoBehaviour
|
||||
{
|
||||
private float timer;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
timer += 1 * Time.deltaTime;
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
|
||||
public class Extruder : BasicMachine
|
||||
{
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public new void Start()
|
||||
{
|
||||
base.Start();
|
||||
@ -30,7 +30,7 @@ public class Extruder : BasicMachine
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public new void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
@ -10,13 +10,13 @@ public class ExtruderPiston : MonoBehaviour
|
||||
private bool movingBack;
|
||||
private bool soundPlayed;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
originalPosition = transform.position;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (extruder.GetComponent<Light>().enabled == true)
|
||||
|
@ -64,7 +64,7 @@ public class GameManager : MonoBehaviour
|
||||
public Coroutine hazardRemovalCoroutine;
|
||||
public List<Vector3> meteorShowerLocationList;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
ironBlocks = new GameObject[50];
|
||||
@ -112,13 +112,13 @@ public class GameManager : MonoBehaviour
|
||||
brickCount++;
|
||||
}
|
||||
|
||||
// Get a reference to the player
|
||||
// Get a reference to the player.
|
||||
player = GameObject.Find("Player").GetComponent<PlayerController>();
|
||||
|
||||
// Get a reference to the rocket
|
||||
// Get a reference to the rocket.
|
||||
rocketScript = rocketObject.GetComponent<Rocket>();
|
||||
|
||||
// Initiate meteor shower location list
|
||||
// Initiate meteor shower location list.
|
||||
meteorShowerLocationList = new List<Vector3>();
|
||||
|
||||
// Create the hazard manager.
|
||||
@ -128,7 +128,7 @@ public class GameManager : MonoBehaviour
|
||||
meshManager = new CombinedMeshManager(this);
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (FileBasedPrefs.initialized == true)
|
||||
@ -212,7 +212,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// A save game request is pending
|
||||
// A save game request is pending.
|
||||
if (dataSaveRequested == true)
|
||||
{
|
||||
if (GetComponent<StateManager>().saving == false && GetComponent<StateManager>().assigningIDs == false)
|
||||
@ -223,7 +223,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Used to ensure components are removed before combining meshes
|
||||
// Used to ensure components are removed before combining meshes.
|
||||
if (waitingForDestroy == true)
|
||||
{
|
||||
waitTime += 1 * Time.deltaTime;
|
||||
@ -235,7 +235,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes.
|
||||
if (clearBrickDummies == true)
|
||||
{
|
||||
if (initBrickTimer < 3)
|
||||
@ -257,7 +257,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes.
|
||||
if (clearGlassDummies == true)
|
||||
{
|
||||
if (initGlassTimer < 3)
|
||||
@ -279,7 +279,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes.
|
||||
if (clearIronDummies == true)
|
||||
{
|
||||
if (initIronTimer < 3)
|
||||
@ -301,7 +301,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes
|
||||
// Clear out dummy objects used for smooth transitions while combining meshes.
|
||||
if (clearSteelDummies == true)
|
||||
{
|
||||
if (initSteelTimer < 3)
|
||||
@ -327,7 +327,7 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Saves the game on exit
|
||||
//! Saves the game on exit.
|
||||
public void RequestSaveOperation()
|
||||
{
|
||||
if (working == false && GetComponent<StateManager>().saving == false)
|
||||
@ -337,4 +337,4 @@ public class GameManager : MonoBehaviour
|
||||
blocksCombined = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
|
||||
public class GearCutter : BasicMachine
|
||||
{
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public new void Start()
|
||||
{
|
||||
base.Start();
|
||||
@ -32,7 +32,7 @@ public class GearCutter : BasicMachine
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public new void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
3
Glass.cs
3
Glass.cs
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class is attached to all glass block prefabs.
|
||||
public class Glass : MonoBehaviour
|
||||
{
|
||||
public string ID = "unassigned";
|
||||
@ -7,7 +8,7 @@ public class Glass : MonoBehaviour
|
||||
public int address;
|
||||
private float updateTick;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
|
@ -5,18 +5,20 @@ public class HazardManager
|
||||
{
|
||||
private GameManager gameManager;
|
||||
|
||||
//! This class handles all meteor showers and pirate attacks.
|
||||
public HazardManager(GameManager gameManager)
|
||||
{
|
||||
this.gameManager = gameManager;
|
||||
}
|
||||
|
||||
//! Called by the game manager to increment timers and carry out meteor showers and pirate attacks when needed.
|
||||
public void UpdateHazards()
|
||||
{
|
||||
if (gameManager.hazardsEnabled == true)
|
||||
{
|
||||
if (gameManager.player.timeToDeliver == false && gameManager.rocketScript.gameTime < 2000)
|
||||
{
|
||||
// Pirate attacks
|
||||
// Pirate attacks.
|
||||
if (gameManager.rocketScript.day >= 10 && gameManager.GetComponent<StateManager>().worldLoaded == true)
|
||||
{
|
||||
gameManager.pirateAttackTimer += 1 * Time.deltaTime;
|
||||
@ -74,7 +76,7 @@ public class HazardManager
|
||||
}
|
||||
}
|
||||
|
||||
// Meteor showers
|
||||
// Meteor showers.
|
||||
if (gameManager.GetComponent<StateManager>().worldLoaded)
|
||||
{
|
||||
gameManager.meteorShowerTimer += 1 * Time.deltaTime;
|
||||
@ -146,7 +148,7 @@ public class HazardManager
|
||||
}
|
||||
}
|
||||
|
||||
// Removes all hazards from the world
|
||||
//! Removes all hazards from the world.
|
||||
private void StopHazards()
|
||||
{
|
||||
gameManager.pirateTimer = 0;
|
||||
@ -170,7 +172,7 @@ public class HazardManager
|
||||
gameManager.hazardRemovalCoroutine = gameManager.StartCoroutine(HazardRemovalCoroutine());
|
||||
}
|
||||
|
||||
// Removes all hazards from the world
|
||||
//! Removes all hazards from the world.
|
||||
private IEnumerator HazardRemovalCoroutine()
|
||||
{
|
||||
Meteor[] allMeteors = Object.FindObjectsOfType<Meteor>();
|
||||
@ -192,5 +194,4 @@ public class HazardManager
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -7,20 +7,20 @@ public class HeadBob : MonoBehaviour
|
||||
private Quaternion originalRotation;
|
||||
public GameObject player;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
originalRotation = transform.localRotation;
|
||||
}
|
||||
|
||||
// Resets the camera rotation
|
||||
//! Resets the camera rotation.
|
||||
public void Reset()
|
||||
{
|
||||
transform.localRotation = originalRotation;
|
||||
timer = 0;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (active == true)
|
||||
@ -44,4 +44,4 @@ public class HeadBob : MonoBehaviour
|
||||
timer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -21,7 +21,7 @@ public class HeatExchanger : MonoBehaviour
|
||||
public bool connectionFailed;
|
||||
private GameObject builtObjects;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
connectionLine = gameObject.AddComponent<LineRenderer>();
|
||||
@ -33,7 +33,7 @@ public class HeatExchanger : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -126,7 +126,7 @@ public class HeatExchanger : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! The object exists, is active and is not a standard building block.
|
||||
private bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -136,7 +136,7 @@ public class HeatExchanger : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Used to notify attached machines when the heat exchanger is destroyed
|
||||
//! Used to notify attached machines when the heat exchanger is destroyed.
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (outputObject != null)
|
||||
@ -204,7 +204,7 @@ public class HeatExchanger : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Connects to the nearest compatible object
|
||||
//! Connects to the nearest compatible object.
|
||||
private void ConnectToObject(GameObject obj)
|
||||
{
|
||||
if (obj.GetComponent<UniversalExtractor>() != null)
|
||||
@ -641,7 +641,7 @@ public class HeatExchanger : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Sets the heat exchanger's output ID to the output object's ID
|
||||
//! Sets the heat exchanger's output ID to the output object's ID.
|
||||
private void SetOutputID()
|
||||
{
|
||||
if (outputObject.GetComponent<NuclearReactor>() != null)
|
||||
@ -698,7 +698,7 @@ public class HeatExchanger : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Overall operation of the heat exchanger
|
||||
//! Overall operation of the heat exchanger.
|
||||
private void DoWork()
|
||||
{
|
||||
if (outputObject.GetComponent<UniversalExtractor>() != null)
|
||||
|
@ -8,20 +8,20 @@ public class HeldItemSway : MonoBehaviour
|
||||
private Quaternion originalRotation;
|
||||
public GameObject player;
|
||||
|
||||
// Start is called before the first frame update
|
||||
//! Start is called before the first frame update.
|
||||
void Start()
|
||||
{
|
||||
originalRotation = transform.localRotation;
|
||||
}
|
||||
|
||||
// Resets the object's rotation
|
||||
//! Resets the object's rotation.
|
||||
public void Reset()
|
||||
{
|
||||
transform.localRotation = originalRotation;
|
||||
timer = 0;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
//! Update is called once per frame.
|
||||
void Update()
|
||||
{
|
||||
if (active == true)
|
||||
@ -69,4 +69,4 @@ public class HeldItemSway : MonoBehaviour
|
||||
timer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -2,5 +2,5 @@
|
||||
|
||||
public class HolderDummy : MonoBehaviour
|
||||
{
|
||||
// This class is attached to placeholder objects identified through Unity's GetComponent method.
|
||||
//! This class is attached to placeholder objects identified through Unity's GetComponent method.
|
||||
}
|
||||
|
10
InfoHUD.cs
10
InfoHUD.cs
@ -11,7 +11,7 @@ public class InfoHUD : MonoBehaviour
|
||||
private string machineDisplayInputID = "unassigned";
|
||||
private string machineDisplayInputID2 = "unassigned";
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
@ -19,7 +19,7 @@ public class InfoHUD : MonoBehaviour
|
||||
guiCoordinates = new GuiCoordinates();
|
||||
}
|
||||
|
||||
// Returns true if the info hud should be drawn
|
||||
//! Returns true if the info hud should be drawn.
|
||||
private bool ShouldDrawInfoHud()
|
||||
{
|
||||
return playerController.stateManager.worldLoaded == true
|
||||
@ -33,13 +33,13 @@ public class InfoHUD : MonoBehaviour
|
||||
&& playerController.tabletOpen == false;
|
||||
}
|
||||
|
||||
// Called by unity engine for rendering and handling GUI events
|
||||
//! Called by unity engine for rendering and handling GUI events.
|
||||
public void OnGUI()
|
||||
{
|
||||
//STYLE
|
||||
//! STYLE
|
||||
GUI.skin = GetComponent<PlayerGUI>().thisGUIskin;
|
||||
|
||||
//ASPECT RATIO
|
||||
//! ASPECT RATIO
|
||||
float ScreenHeight = Screen.height;
|
||||
float ScreenWidth = Screen.width;
|
||||
if (ScreenWidth / ScreenHeight < 1.7f)
|
||||
|
@ -6,6 +6,7 @@ public class InputManager
|
||||
private BuildController buildController;
|
||||
private ActionManager actionManager;
|
||||
|
||||
//! This class handles all input from the player.
|
||||
public InputManager(PlayerController playerController)
|
||||
{
|
||||
this.playerController = playerController;
|
||||
@ -13,7 +14,7 @@ public class InputManager
|
||||
buildController = playerController.GetComponent<BuildController>();
|
||||
}
|
||||
|
||||
// Returns true if the player's current build type is a standard block.
|
||||
//! Returns true if the player's current build type is a standard block.
|
||||
private bool PlacingStandardBlock()
|
||||
{
|
||||
return playerController.buildType.Equals("Glass Block")
|
||||
@ -24,16 +25,16 @@ public class InputManager
|
||||
|| playerController.buildType.Equals("Iron Ramp");
|
||||
}
|
||||
|
||||
// Recieves all actions from cInput.
|
||||
//! Recieves all actions from cInput.
|
||||
public void HandleInput()
|
||||
{
|
||||
//CROSSHAIR
|
||||
// CROSSHAIR
|
||||
if (cInput.GetKeyDown("Crosshair") && playerController.exiting == false)
|
||||
{
|
||||
actionManager.ToggleCrosshair();
|
||||
}
|
||||
|
||||
//SPRINTING
|
||||
// SPRINTING
|
||||
if (cInput.GetKey("Sprint") && playerController.exiting == false)
|
||||
{
|
||||
playerController.playerMoveSpeed = 25;
|
||||
@ -58,7 +59,7 @@ public class InputManager
|
||||
actionManager.ResetHeldItemSway();
|
||||
}
|
||||
|
||||
//MOVEMENT INPUT
|
||||
// MOVEMENT INPUT
|
||||
if (playerController.exiting == false)
|
||||
{
|
||||
if (cInput.GetKey("Walk Forward"))
|
||||
@ -101,7 +102,7 @@ public class InputManager
|
||||
actionManager.StopGroundEffects();
|
||||
}
|
||||
|
||||
//WEAPON SELECTION
|
||||
// WEAPON SELECTION
|
||||
if (!playerController.GuiOpen())
|
||||
{
|
||||
if (cInput.GetKeyDown("Paint Gun"))
|
||||
@ -139,7 +140,7 @@ public class InputManager
|
||||
playerController.scannerActive = false;
|
||||
}
|
||||
|
||||
//FIRING THE LASER CANNON OR THE SCANNER
|
||||
// FIRING THE LASER CANNON OR THE SCANNER
|
||||
if (cInput.GetKeyDown("Fire") && playerController.exiting == false)
|
||||
{
|
||||
if (!playerController.GuiOpen())
|
||||
@ -178,7 +179,7 @@ public class InputManager
|
||||
actionManager.ToggleHeadLamp();
|
||||
}
|
||||
|
||||
//JETPACK
|
||||
// JETPACK
|
||||
if (cInput.GetKey("Jetpack") && playerController.exiting == false)
|
||||
{
|
||||
actionManager.JetPackThrust();
|
||||
@ -191,7 +192,7 @@ public class InputManager
|
||||
}
|
||||
}
|
||||
|
||||
//BUILD MULTIPLIER
|
||||
// BUILD MULTIPLIER
|
||||
if (playerController.building == true && PlacingStandardBlock())
|
||||
{
|
||||
if (cInput.GetKey("Build Amount +") && playerController.buildMultiplier < 100)
|
||||
@ -204,7 +205,7 @@ public class InputManager
|
||||
}
|
||||
}
|
||||
|
||||
//SELECTING CURRENT BLOCK TO BUILD WITH
|
||||
// SELECTING CURRENT BLOCK TO BUILD WITH
|
||||
if (!playerController.GuiOpen())
|
||||
{
|
||||
if (cInput.GetKeyDown("Next Item"))
|
||||
@ -228,7 +229,7 @@ public class InputManager
|
||||
}
|
||||
}
|
||||
|
||||
//BLOCK ROTATION
|
||||
// BLOCK ROTATION
|
||||
if (cInput.GetKeyDown("Rotate Block"))
|
||||
{
|
||||
if (playerController.building == true)
|
||||
@ -240,7 +241,7 @@ public class InputManager
|
||||
}
|
||||
}
|
||||
|
||||
//BUILD AXIS
|
||||
// BUILD AXIS
|
||||
if (cInput.GetKeyDown("Build Axis"))
|
||||
{
|
||||
playerController.PlayButtonSound();
|
||||
@ -254,43 +255,43 @@ public class InputManager
|
||||
playerController.autoAxisMessage = true;
|
||||
}
|
||||
|
||||
//IF THE PLAYER HAS SELECTED AN ITEM AND HAS THAT ITEM IN THE INVENTORY, BEGIN BUILDING ON KEY PRESS
|
||||
// IF THE PLAYER HAS SELECTED AN ITEM AND HAS THAT ITEM IN THE INVENTORY, BEGIN BUILDING ON KEY PRESS
|
||||
if (cInput.GetKeyDown("Build"))
|
||||
{
|
||||
actionManager.StartBuildMode();
|
||||
}
|
||||
|
||||
//CANCEL BUILDING ON KEY PRESS
|
||||
// CANCEL BUILDING ON KEY PRESS
|
||||
if (cInput.GetKeyDown("Stop Building"))
|
||||
{
|
||||
actionManager.StopBuilding();
|
||||
}
|
||||
|
||||
//ACTIVATE INVENTORY GUI ON KEY PRESS
|
||||
// ACTIVATE INVENTORY GUI ON KEY PRESS
|
||||
if (cInput.GetKeyDown("Inventory"))
|
||||
{
|
||||
actionManager.ToggleInventory();
|
||||
}
|
||||
|
||||
//ACTIVATE CRAFTING GUI ON KEY PRESS
|
||||
// ACTIVATE CRAFTING GUI ON KEY PRESS
|
||||
if (cInput.GetKeyDown("Crafting"))
|
||||
{
|
||||
actionManager.ToggleCraftingGUI();
|
||||
}
|
||||
|
||||
//ACTIVATE MARKET GUI ON KEY PRESS
|
||||
// ACTIVATE MARKET GUI ON KEY PRESS
|
||||
if (cInput.GetKeyDown("Market"))
|
||||
{
|
||||
actionManager.ToggleMarketGUI();
|
||||
}
|
||||
|
||||
//ACTIVATE TABLET GUI ON KEY PRESS
|
||||
// ACTIVATE TABLET GUI ON KEY PRESS
|
||||
if (cInput.GetKeyDown("Tablet"))
|
||||
{
|
||||
actionManager.ToggleTablet();
|
||||
}
|
||||
|
||||
//OPEN OPTIONS/EXIT MENU WHEN ESCAPE KEY IS PRESSED
|
||||
// OPEN OPTIONS/EXIT MENU WHEN ESCAPE KEY IS PRESSED
|
||||
if (Input.GetKeyDown(KeyCode.Escape) && playerController.exiting == false)
|
||||
{
|
||||
if (playerController.inventoryOpen == true)
|
||||
@ -325,5 +326,4 @@ public class InputManager
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -8,7 +8,7 @@ public class InteractionController : MonoBehaviour
|
||||
private StorageInteraction storageInteraction;
|
||||
private BlockInteraction blockInteraction;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
@ -17,7 +17,7 @@ public class InteractionController : MonoBehaviour
|
||||
blockInteraction = new BlockInteraction(playerController, this);
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
// Raycast and associated data for interacting with machines and other objects.
|
||||
@ -154,7 +154,7 @@ public class InteractionController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if the object in question is a resource node
|
||||
//! Returns true if the object in question is a resource node.
|
||||
private Boolean IsResource(GameObject obj)
|
||||
{
|
||||
if (obj.GetComponent<DarkMatter>() != null || obj.GetComponent<UniversalResource>() != null)
|
||||
@ -164,7 +164,7 @@ public class InteractionController : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns true if the object in question is a storage container
|
||||
//! Returns true if the object in question is a storage container.
|
||||
private Boolean IsStorageContainer(GameObject obj)
|
||||
{
|
||||
if (obj.GetComponent<InventoryManager>() != null && obj.GetComponent<Retriever>() == null && obj.GetComponent<AutoCrafter>() == null)
|
||||
@ -174,7 +174,7 @@ public class InteractionController : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Destroys an object in the world and adds it's associated inventory item to the player's inventory
|
||||
//! Destroys an object in the world and adds it's associated inventory item to the player's inventory.
|
||||
public void CollectObject(string type)
|
||||
{
|
||||
bool spaceAvailable = false;
|
||||
@ -198,7 +198,7 @@ public class InteractionController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Opens the machine GUI
|
||||
//! Opens the machine GUI.
|
||||
public void OpenMachineGUI()
|
||||
{
|
||||
if (playerController.machineGUIopen == false)
|
||||
@ -239,7 +239,7 @@ public class InteractionController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the player is no longer looking at any interactive objects
|
||||
//! Called when the player is no longer looking at any interactive objects.
|
||||
private void EndInteraction()
|
||||
{
|
||||
if (playerController.machineGUIopen == true)
|
||||
@ -256,5 +256,4 @@ public class InteractionController : MonoBehaviour
|
||||
playerController.machineInputAmount = 0;
|
||||
playerController.machineOutputAmount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -18,7 +18,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
private int craftingPage;
|
||||
private int modCraftingIndex;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
@ -29,13 +29,13 @@ public class InventoryGUI : MonoBehaviour
|
||||
guiCoordinates = new GuiCoordinates();
|
||||
}
|
||||
|
||||
// Called by unity engine for rendering and handling GUI events
|
||||
//! Called by unity engine for rendering and handling GUI events.
|
||||
public void OnGUI()
|
||||
{
|
||||
//STYLE
|
||||
// STYLE
|
||||
GUI.skin = GetComponent<PlayerGUI>().thisGUIskin;
|
||||
|
||||
//ASPECT RATIO
|
||||
// ASPECT RATIO
|
||||
float ScreenHeight = Screen.height;
|
||||
float ScreenWidth = Screen.width;
|
||||
if (ScreenWidth / ScreenHeight < 1.7f)
|
||||
@ -68,7 +68,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
inventorySlotNumber++;
|
||||
}
|
||||
|
||||
//STORAGE CONTAINER ITEM DRAWING
|
||||
// STORAGE CONTAINER ITEM DRAWING
|
||||
if (playerController.storageGUIopen == true)
|
||||
{
|
||||
GUI.DrawTexture(guiCoordinates.inventoryInfoRectBG, textureDictionary.dictionary["Interface Background"]);
|
||||
@ -90,7 +90,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//STORAGE COMPUTER INVENTORY SWITCHING
|
||||
// STORAGE COMPUTER INVENTORY SWITCHING
|
||||
if (playerController.storageGUIopen == true && playerController.remoteStorageActive == true)
|
||||
{
|
||||
StorageComputer computer = playerController.currentStorageComputer.GetComponent<StorageComputer>();
|
||||
@ -161,18 +161,18 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//////////DRAG AND DROP//////////
|
||||
Vector2 mousePos = Event.current.mousePosition; //MOUSE POSITION
|
||||
// // // // // DRAG AND DROP // // // // //
|
||||
Vector2 mousePos = Event.current.mousePosition; // MOUSE POSITION
|
||||
|
||||
if (playerController.storageGUIopen == true) //PLAYER IS ACCESSING A STORAGE CONTAINER
|
||||
if (playerController.storageGUIopen == true) // PLAYER IS ACCESSING A STORAGE CONTAINER
|
||||
{
|
||||
//PLAYER IS DRAGGING AN ITEM
|
||||
// PLAYER IS DRAGGING AN ITEM
|
||||
if (playerController.draggingItem == true)
|
||||
{
|
||||
GUI.DrawTexture(new Rect(Event.current.mousePosition.x - ScreenWidth * 0.0145f, Event.current.mousePosition.y - ScreenHeight * 0.03f, (ScreenWidth * 0.029f), (ScreenHeight * 0.06f)), textureDictionary.dictionary[playerController.itemToDrag]);
|
||||
if (Input.GetKeyUp(KeyCode.Mouse0))
|
||||
{
|
||||
//DROPPING ITEMS INTO THE PLAYER'S INVENTORY
|
||||
// DROPPING ITEMS INTO THE PLAYER'S INVENTORY
|
||||
playerController.draggingItem = false;
|
||||
int inventoryDropSlot = 0;
|
||||
foreach (Rect rect in guiCoordinates.inventorySlotRects)
|
||||
@ -202,7 +202,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
inventoryDropSlot++;
|
||||
}
|
||||
|
||||
//DROPPING ITEMS INTO THE STORAGE CONTAINER
|
||||
// DROPPING ITEMS INTO THE STORAGE CONTAINER
|
||||
int storageInventoryDropSlot = 0;
|
||||
foreach (Rect rect in guiCoordinates.storageInventorySlotRects)
|
||||
{
|
||||
@ -233,7 +233,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//DRAGGING ITEMS FROM THE PLAYER'S INVENTORY
|
||||
// DRAGGING ITEMS FROM THE PLAYER'S INVENTORY
|
||||
int inventoryDragSlot = 0;
|
||||
foreach (Rect rect in guiCoordinates.inventorySlotRects)
|
||||
{
|
||||
@ -284,7 +284,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
inventoryDragSlot++;
|
||||
}
|
||||
|
||||
//DRAGGING ITEMS FROM THE STORAGE CONTAINER
|
||||
// DRAGGING ITEMS FROM THE STORAGE CONTAINER
|
||||
int storageInventoryDragSlot = 0;
|
||||
foreach (Rect rect in guiCoordinates.storageInventorySlotRects)
|
||||
{
|
||||
@ -344,10 +344,10 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
//NO STORAGE CONTAINER IS OPEN. THE PLAYER IS DRAGGING AND DROPPING ITEMS WITHIN THEIR OWN INVENTORY
|
||||
// NO STORAGE CONTAINER IS OPEN. THE PLAYER IS DRAGGING AND DROPPING ITEMS WITHIN THEIR OWN INVENTORY
|
||||
if (playerController.draggingItem == true)
|
||||
{
|
||||
//DROPPING ITEMS INTO THE PLAYER'S INVENTORY
|
||||
// DROPPING ITEMS INTO THE PLAYER'S INVENTORY
|
||||
GUI.DrawTexture(new Rect(Event.current.mousePosition.x - ScreenWidth * 0.0145f, Event.current.mousePosition.y - ScreenHeight * 0.03f, (ScreenWidth * 0.025f), (ScreenHeight * 0.05f)), textureDictionary.dictionary[playerController.itemToDrag]);
|
||||
if (Input.GetKeyUp(KeyCode.Mouse0))
|
||||
{
|
||||
@ -382,7 +382,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//DRAGGING ITEMS FROM THE PLAYER'S INVENTORY
|
||||
// DRAGGING ITEMS FROM THE PLAYER'S INVENTORY
|
||||
int inventoryDragSlot = 0;
|
||||
foreach (Rect rect in guiCoordinates.inventorySlotRects)
|
||||
{
|
||||
@ -418,7 +418,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//MESSAGE TELLING THE PLAYER THEY ARE MISSING THE ITEMS REQUIRED TO CRAFT AN OBJECT
|
||||
// MESSAGE TELLING THE PLAYER THEY ARE MISSING THE ITEMS REQUIRED TO CRAFT AN OBJECT
|
||||
if (craftingManager.missingItem == true)
|
||||
{
|
||||
if (missingItemTimer < 3)
|
||||
@ -433,7 +433,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//MESSAGE TELLING THE PLAYER THEIR INVENTORY IS FULL
|
||||
//! MESSAGE TELLING THE PLAYER THEIR INVENTORY IS FULL
|
||||
if (playerController.outOfSpace == true)
|
||||
{
|
||||
if (playerController.outOfSpaceTimer < 3)
|
||||
@ -450,7 +450,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
|
||||
if (playerController.marketGUIopen == false)
|
||||
{
|
||||
//BUTTON WHICH OPENS THE CRAFTING GUI
|
||||
// BUTTON WHICH OPENS THE CRAFTING GUI
|
||||
if (playerController.storageGUIopen == false)
|
||||
{
|
||||
if (GUI.Button(guiCoordinates.craftingButtonRect, "CRAFTING"))
|
||||
@ -467,7 +467,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//BUTTON THAT CLOSES THE INVENTORY GUI
|
||||
// BUTTON THAT CLOSES THE INVENTORY GUI
|
||||
if (GUI.Button(guiCoordinates.closeButtonRect, "CLOSE"))
|
||||
{
|
||||
Cursor.visible = false;
|
||||
@ -479,7 +479,7 @@ public class InventoryGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//CRAFTING GUI
|
||||
// CRAFTING GUI
|
||||
if (playerController.craftingGUIopen == true)
|
||||
{
|
||||
if (craftingPage == 0)
|
||||
|
@ -12,7 +12,7 @@ public class InventoryManager : MonoBehaviour
|
||||
public int maxStackSize = 1000;
|
||||
public bool itemAdded;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (ID != "unassigned" && initialized == false)
|
||||
@ -61,7 +61,7 @@ public class InventoryManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Saves the inventory's contents to disk
|
||||
//! Saves the inventory's contents to disk.
|
||||
public void SaveData()
|
||||
{
|
||||
if (initialized == true)
|
||||
@ -87,7 +87,7 @@ public class InventoryManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Adds an item to the inventory
|
||||
//! Adds an item to the inventory.
|
||||
public void AddItem(string type, int amount)
|
||||
{
|
||||
itemAdded = false;
|
||||
@ -108,6 +108,7 @@ public class InventoryManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Adds an item to a specific inventory slot.
|
||||
public void AddItemToSlot(string type, int amount, int slot)
|
||||
{
|
||||
inventory[slot].typeInSlot = type;
|
||||
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This object is used in arrays by the inventory manager to hold item names and amounts.
|
||||
public class InventorySlot : MonoBehaviour
|
||||
{
|
||||
public int amountInSlot;
|
||||
|
16
Iron.cs
16
Iron.cs
@ -1,18 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
public class Iron : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
//! Deprecated. Legacy resource node.
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class is attached to all iron block prefabs.
|
||||
public class IronBlock : MonoBehaviour
|
||||
{
|
||||
public string ID = "unassigned";
|
||||
@ -7,7 +8,7 @@ public class IronBlock : MonoBehaviour
|
||||
public int address;
|
||||
private float updateTick;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
|
@ -5,19 +5,20 @@ public class LaserController
|
||||
private GameManager gameManager;
|
||||
private PlayerController playerController;
|
||||
|
||||
//! This class handles RaycastHits for the player's laser cannon.
|
||||
public LaserController(PlayerController playerController, GameManager gameManager)
|
||||
{
|
||||
this.playerController = playerController;
|
||||
this.gameManager = gameManager;
|
||||
}
|
||||
|
||||
// Returns true if a message can be sent to the player's tablet
|
||||
//! Returns true if a message can be sent to the player's tablet.
|
||||
private bool CanSendDestructionMessage()
|
||||
{
|
||||
return playerController.timeToDeliver == false && playerController.meteorShowerWarningActive == false && playerController.pirateAttackWarningActive == false;
|
||||
}
|
||||
|
||||
// Called when the player's laser cannon shoots something
|
||||
//! Called when the player's laser cannon shoots something.
|
||||
public void HitTarget(GameObject target,RaycastHit hit)
|
||||
{
|
||||
if (target.GetComponent<Meteor>() != null)
|
||||
@ -134,4 +135,4 @@ public class LaserController
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class handles animation of the gear cutter's laser.
|
||||
public class LaserCutter : MonoBehaviour
|
||||
{
|
||||
public GameObject gearCutter;
|
||||
|
||||
// Update is called once per frame
|
||||
//! Update is called once per frame.
|
||||
public void Update()
|
||||
{
|
||||
if (gearCutter.GetComponent<Light>().enabled == true)
|
||||
|
@ -7,7 +7,7 @@ public class MachineGUI : MonoBehaviour
|
||||
private TextureDictionary textureDictionary;
|
||||
private bool hubStopWindowOpen;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
@ -15,13 +15,13 @@ public class MachineGUI : MonoBehaviour
|
||||
guiCoordinates = new GuiCoordinates();
|
||||
}
|
||||
|
||||
// Called by unity engine for rendering and handling GUI events
|
||||
//! Called by unity engine for rendering and handling GUI events.
|
||||
public void OnGUI()
|
||||
{
|
||||
//STYLE
|
||||
// STYLE
|
||||
GUI.skin = GetComponent<PlayerGUI>().thisGUIskin;
|
||||
|
||||
//ASPECT RATIO
|
||||
// ASPECT RATIO
|
||||
float ScreenHeight = Screen.height;
|
||||
float ScreenWidth = Screen.width;
|
||||
if (ScreenWidth / ScreenHeight < 1.7f)
|
||||
@ -35,7 +35,7 @@ public class MachineGUI : MonoBehaviour
|
||||
|
||||
if (playerController.stateManager.worldLoaded == true && GetComponent<MainMenu>().finishedLoading == true)
|
||||
{
|
||||
//MACHINE CONTROL GUI
|
||||
// MACHINE CONTROL GUI
|
||||
if (playerController.inventoryOpen == false && playerController.machineGUIopen == true && playerController.objectInSight != null)
|
||||
{
|
||||
GameObject obj = playerController.objectInSight;
|
||||
@ -96,7 +96,7 @@ public class MachineGUI : MonoBehaviour
|
||||
}
|
||||
catch
|
||||
{
|
||||
//NOOP
|
||||
// NOOP
|
||||
}
|
||||
GUI.Label(guiCoordinates.outputLabelRect, "Range");
|
||||
hub.range = (int)GUI.HorizontalSlider(guiCoordinates.outputControlButton2Rect, hub.range, 6, 120);
|
||||
@ -581,4 +581,4 @@ public class MachineGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -5,12 +5,14 @@ public class MachineInteraction
|
||||
private PlayerController playerController;
|
||||
private InteractionController interactionController;
|
||||
|
||||
//! This class handles the player's interactions with machines.
|
||||
public MachineInteraction(PlayerController playerController, InteractionController interactionController)
|
||||
{
|
||||
this.playerController = playerController;
|
||||
this.interactionController = interactionController;
|
||||
}
|
||||
|
||||
//! Called when the player is looking at an electric light.
|
||||
public void InteractWithElectricLight()
|
||||
{
|
||||
if(cInput.GetKeyDown("Collect Object"))
|
||||
@ -19,6 +21,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a quantum hatchway.
|
||||
public void InteractWithAirLock()
|
||||
{
|
||||
AirLock airLock = playerController.objectInSight.GetComponent<AirLock>();
|
||||
@ -47,6 +50,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a power source.
|
||||
public void InteractWithPowerSource()
|
||||
{
|
||||
PowerSource powerSource = playerController.objectInSight.GetComponent<PowerSource>();
|
||||
@ -100,6 +104,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a nuclear reactor.
|
||||
public void InteractWithNuclearReactor()
|
||||
{
|
||||
NuclearReactor reactor = playerController.objectInSight.GetComponent<NuclearReactor>();
|
||||
@ -112,6 +117,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a power conduit.
|
||||
public void InteractWithPowerConduit()
|
||||
{
|
||||
PowerConduit powerConduit = playerController.objectInSight.GetComponent<PowerConduit>();
|
||||
@ -135,6 +141,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a turret.
|
||||
public void InteractWithTurret()
|
||||
{
|
||||
Turret turret = playerController.objectInSight.GetComponent<Turret>();
|
||||
@ -155,6 +162,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a universal extractor.
|
||||
public void InteractWithUniversalExtractor()
|
||||
{
|
||||
UniversalExtractor extractor = playerController.objectInSight.GetComponent<UniversalExtractor>();
|
||||
@ -177,6 +185,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at an auger.
|
||||
public void InteractWithAuger()
|
||||
{
|
||||
Auger auger = playerController.objectInSight.GetComponent<Auger>();
|
||||
@ -198,6 +207,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a dark matter collector.
|
||||
public void InteractWithDarkMatterCollector()
|
||||
{
|
||||
DarkMatterCollector collector = playerController.objectInSight.GetComponent<DarkMatterCollector>();
|
||||
@ -226,6 +236,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a universal conduit.
|
||||
public void InteractWithUniversalConduit()
|
||||
{
|
||||
UniversalConduit conduit = playerController.objectInSight.GetComponent<UniversalConduit>();
|
||||
@ -414,6 +425,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a dark matter conduit.
|
||||
public void InteractWithDarkMatterConduit()
|
||||
{
|
||||
DarkMatterConduit dmConduit = playerController.objectInSight.GetComponent<DarkMatterConduit>();
|
||||
@ -491,6 +503,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a smelter.
|
||||
public void InteractWithSmelter()
|
||||
{
|
||||
Smelter smelter = playerController.objectInSight.GetComponent<Smelter>();
|
||||
@ -538,6 +551,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at an alloy smelter.
|
||||
public void InteractWithAlloySmelter()
|
||||
{
|
||||
AlloySmelter alloySmelter = playerController.objectInSight.GetComponent<AlloySmelter>();
|
||||
@ -596,6 +610,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at an extruder.
|
||||
public void InteractWithExtruder()
|
||||
{
|
||||
Extruder extruder = playerController.objectInSight.GetComponent<Extruder>();
|
||||
@ -643,6 +658,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at any machine added through the modding API (excluding plugins).
|
||||
public void InteractWithModMachine()
|
||||
{
|
||||
ModMachine modMachine = playerController.objectInSight.GetComponent<ModMachine>();
|
||||
@ -690,6 +706,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a rail cart hub.
|
||||
public void InteractWithRailCartHub()
|
||||
{
|
||||
RailCartHub railCartHub = playerController.objectInSight.GetComponent<RailCartHub>();
|
||||
@ -724,6 +741,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a retriever.
|
||||
public void InteractWithRetriever()
|
||||
{
|
||||
Retriever retriever = playerController.objectInSight.GetComponent<Retriever>();
|
||||
@ -785,6 +803,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a heat exchanger.
|
||||
public void InteractWithHeatExchanger()
|
||||
{
|
||||
HeatExchanger heatExchanger = playerController.objectInSight.GetComponent<HeatExchanger>();
|
||||
@ -870,6 +889,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a gear cutter.
|
||||
public void InteractWithGearCutter()
|
||||
{
|
||||
GearCutter gearCutter = playerController.objectInSight.GetComponent<GearCutter>();
|
||||
@ -917,6 +937,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a press.
|
||||
public void InteractWithPress()
|
||||
{
|
||||
Press press = playerController.objectInSight.GetComponent<Press>();
|
||||
@ -964,6 +985,7 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at an auto crafter.
|
||||
public void InteractWithAutoCrafter()
|
||||
{
|
||||
AutoCrafter autoCrafter = playerController.objectInSight.GetComponent<AutoCrafter>();
|
||||
@ -1004,4 +1026,4 @@ public class MachineInteraction
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
MainMenu.cs
14
MainMenu.cs
@ -26,7 +26,7 @@ public class MainMenu : MonoBehaviour
|
||||
private bool deletePrompt;
|
||||
private bool escapePrompt;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
stateManager = GameObject.Find("GameManager").GetComponent<StateManager>();
|
||||
@ -45,6 +45,7 @@ public class MainMenu : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Confirms world selection and loads the world.
|
||||
private void SelectWorld()
|
||||
{
|
||||
if (worldSelected == false && worldName != "Enter World Name")
|
||||
@ -83,6 +84,7 @@ public class MainMenu : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when Kepler-1625 is selected and the scene needs to be changed.
|
||||
private void ChangeScene()
|
||||
{
|
||||
PlayerPrefsX.SetPersistentStringArray("Worlds", worldList.ToArray());
|
||||
@ -92,6 +94,7 @@ public class MainMenu : MonoBehaviour
|
||||
SceneManager.LoadScene(1);
|
||||
}
|
||||
|
||||
//! Called when Gliese 876 is selected and the scene does not need to be changed.
|
||||
private void StartGame()
|
||||
{
|
||||
PlayerPrefsX.SetPersistentStringArray("Worlds", worldList.ToArray());
|
||||
@ -101,6 +104,7 @@ public class MainMenu : MonoBehaviour
|
||||
ambient.enabled = false;
|
||||
}
|
||||
|
||||
//! Gets the size of in pixels of text so it can be positioned on the screen accordingly.
|
||||
private Vector2 GetStringSize(string str)
|
||||
{
|
||||
GUIContent content = new GUIContent(str);
|
||||
@ -109,13 +113,13 @@ public class MainMenu : MonoBehaviour
|
||||
return style.CalcSize(content);
|
||||
}
|
||||
|
||||
// Called by unity engine for rendering and handling GUI events
|
||||
//! Called by unity engine for rendering and handling GUI events.
|
||||
public void OnGUI()
|
||||
{
|
||||
//STYLE
|
||||
// STYLE
|
||||
GUI.skin = thisGUIskin;
|
||||
|
||||
//ASPECT RATIO
|
||||
// ASPECT RATIO
|
||||
float ScreenHeight = Screen.height;
|
||||
float ScreenWidth = Screen.width;
|
||||
if (ScreenWidth / ScreenHeight < 1.7f)
|
||||
@ -416,4 +420,4 @@ public class MainMenu : MonoBehaviour
|
||||
finishedLoading = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
18
MarketGUI.cs
18
MarketGUI.cs
@ -11,7 +11,7 @@ public class MarketGUI : MonoBehaviour
|
||||
private bool selling;
|
||||
private bool loadedValues;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
@ -55,7 +55,7 @@ public class MarketGUI : MonoBehaviour
|
||||
};
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (playerController.stateManager.worldLoaded == true && loadedValues == false)
|
||||
@ -77,7 +77,7 @@ public class MarketGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Saves world specific item prices.
|
||||
//! Saves world specific item prices.
|
||||
private void SavePrices()
|
||||
{
|
||||
foreach (KeyValuePair<string, int> i in priceDictionary)
|
||||
@ -86,7 +86,7 @@ public class MarketGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Buy an item from the market.
|
||||
//! Buy an item from the market.
|
||||
private void BuyItem(string item)
|
||||
{
|
||||
if (playerController.money >= priceDictionary[item])
|
||||
@ -107,7 +107,7 @@ public class MarketGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Sell an item to the market.
|
||||
//! Sell an item to the market.
|
||||
private void SellItem(string item)
|
||||
{
|
||||
InventorySlot sellSlot = null;
|
||||
@ -140,13 +140,13 @@ public class MarketGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called by unity engine for rendering and handling GUI events
|
||||
//! Called by unity engine for rendering and handling GUI events
|
||||
public void OnGUI()
|
||||
{
|
||||
//STYLE
|
||||
// STYLE
|
||||
GUI.skin = GetComponent<PlayerGUI>().thisGUIskin;
|
||||
|
||||
//ASPECT RATIO
|
||||
// ASPECT RATIO
|
||||
float ScreenHeight = Screen.height;
|
||||
float ScreenWidth = Screen.width;
|
||||
if (ScreenWidth / ScreenHeight < 1.7f)
|
||||
@ -747,4 +747,4 @@ public class MarketGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ public class MeshPainter : MonoBehaviour
|
||||
private float saveTimer;
|
||||
private Coroutine saveDataCoRoutine;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
string worldName = GameObject.Find("GameManager").GetComponent<StateManager>().WorldName;
|
||||
@ -73,7 +73,7 @@ public class MeshPainter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
saveTimer += 1 * Time.deltaTime;
|
||||
@ -84,7 +84,7 @@ public class MeshPainter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//Saves the color of painted objects
|
||||
//! Saves the color of painted objects.
|
||||
private IEnumerator SaveDataCoRoutine()
|
||||
{
|
||||
string worldName = GameObject.Find("GameManager").GetComponent<StateManager>().WorldName;
|
||||
@ -185,4 +185,4 @@ public class MeshPainter : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -11,20 +11,20 @@ public class Meteor : MonoBehaviour
|
||||
private float destroyTimer;
|
||||
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
game = GameObject.Find("GameManager").GetComponent<GameManager>();
|
||||
playerController = GameObject.Find("Player").GetComponent<PlayerController>();
|
||||
}
|
||||
|
||||
// Returns true if a message can be sent to the player's tablet
|
||||
//! Returns true if a message can be sent to the player's tablet.
|
||||
private bool CanSendDestructionMessage()
|
||||
{
|
||||
return playerController.timeToDeliver == false && playerController.meteorShowerWarningActive == false && playerController.pirateAttackWarningActive == false;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (destroying == false)
|
||||
@ -157,7 +157,7 @@ public class Meteor : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Destroys the meteor and spawns explosion effects
|
||||
//! Destroys the meteor and spawns explosion effects.
|
||||
public void Explode()
|
||||
{
|
||||
Instantiate(explosion, new Vector3(transform.position.x,transform.position.y+10,transform.position.z), transform.rotation);
|
||||
|
@ -5,14 +5,14 @@ public class ModMachine : BasicMachine
|
||||
private Material material;
|
||||
public string machineName;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public new void Start()
|
||||
{
|
||||
base.Start();
|
||||
material = new Material(Shader.Find("Standard"));
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public new void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
@ -11,7 +11,7 @@ public class NuclearReactor : MonoBehaviour
|
||||
public int turbineCount;
|
||||
public bool sufficientCooling;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
|
@ -6,7 +6,7 @@ public class PaintGunOffset : MonoBehaviour
|
||||
public GameObject adjustedPaintGun;
|
||||
public GameObject adjustedPaintGun2;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (Camera.main.fieldOfView > 66.6667 && Camera.main.fieldOfView < 73.3334)
|
||||
|
@ -32,7 +32,7 @@ public class PhysicsHandler : MonoBehaviour
|
||||
public string creationMethod = "built";
|
||||
public bool needsSupportCheck;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
|
||||
@ -53,7 +53,7 @@ public class PhysicsHandler : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Updates the physics state of the object
|
||||
//! Updates the physics state of the object.
|
||||
public void UpdatePhysics()
|
||||
{
|
||||
if (stateManager.worldLoaded == true)
|
||||
@ -222,7 +222,7 @@ public class PhysicsHandler : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Checks whether or not a block is properly supported or should fall to the ground
|
||||
//! Checks whether or not a block is properly supported or should fall to the ground.
|
||||
private void CheckForSupport()
|
||||
{
|
||||
supported = false;
|
||||
@ -421,13 +421,13 @@ public class PhysicsHandler : MonoBehaviour
|
||||
needsSupportCheck = false;
|
||||
}
|
||||
|
||||
// Returns true if the block is not at risk of falling
|
||||
//! Returns true if the block is not at risk of falling.
|
||||
public bool IsSupported()
|
||||
{
|
||||
return falling == false && fallingStack == false && needsSupportCheck == false;
|
||||
}
|
||||
|
||||
// Called by unity engine once per physics update for every collider that is touching the trigger
|
||||
//! Called by unity engine once per physics update for every collider that is touching the trigger.
|
||||
public void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (other.gameObject.tag.Equals("Landscape"))
|
||||
@ -437,7 +437,7 @@ public class PhysicsHandler : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called by unity engine when two objects collide
|
||||
//! Called by unity engine when two objects collide.
|
||||
public void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.gameObject.GetComponent<PhysicsHandler>() != null)
|
||||
@ -455,11 +455,10 @@ public class PhysicsHandler : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Destroyes the object and spawns explosion effects
|
||||
//! Destroyes the object and spawns explosion effects.
|
||||
public void Explode()
|
||||
{
|
||||
Instantiate(explosion, transform.position, transform.rotation);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
6
Ping.cs
6
Ping.cs
@ -16,7 +16,7 @@ public class Ping : MonoBehaviour
|
||||
public Material coalMat;
|
||||
public Material unknownMat;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
if (SceneManager.GetActiveScene().name.Equals("QE_World_Atmo"))
|
||||
@ -57,7 +57,7 @@ public class Ping : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
transform.LookAt(GameObject.Find("Player").transform);
|
||||
@ -67,4 +67,4 @@ public class Ping : MonoBehaviour
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
27
Pirate.cs
27
Pirate.cs
@ -22,14 +22,14 @@ public class Pirate : MonoBehaviour
|
||||
private float destroyTimer;
|
||||
public float integrity = 100;
|
||||
|
||||
// Reduces integrity of the object and spawns damage effects
|
||||
//! Reduces integrity of the object and spawns damage effects.
|
||||
public void TakeDamage()
|
||||
{
|
||||
integrity -= 20;
|
||||
Instantiate(damageExplosion, transform.position, transform.rotation);
|
||||
}
|
||||
|
||||
// Destroys the object and spawns explosion effects
|
||||
//! Destroys the object and spawns explosion effects.
|
||||
public void Explode()
|
||||
{
|
||||
Instantiate(explosion, transform.position, transform.rotation);
|
||||
@ -41,7 +41,7 @@ public class Pirate : MonoBehaviour
|
||||
destroying = true;
|
||||
}
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
game = GameObject.Find("GameManager").GetComponent<GameManager>();
|
||||
@ -57,23 +57,23 @@ public class Pirate : MonoBehaviour
|
||||
laser.enabled = false;
|
||||
}
|
||||
|
||||
// Returns true if a message can be sent to the player's tablet
|
||||
//! Returns true if a message can be sent to the player's tablet.
|
||||
private bool CanSendDestructionMessage()
|
||||
{
|
||||
return playerController.timeToDeliver == false && playerController.meteorShowerWarningActive == false && playerController.pirateAttackWarningActive == false;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
//Despawning
|
||||
// Despawning
|
||||
lifeSpan -= 1 * Time.deltaTime;
|
||||
if (lifeSpan <= 0)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
//Destroying
|
||||
// Destroying
|
||||
if (destroying == true)
|
||||
{
|
||||
destroyTimer += 1 * Time.deltaTime;
|
||||
@ -90,12 +90,12 @@ public class Pirate : MonoBehaviour
|
||||
|
||||
if (target == null && destroying == false)
|
||||
{
|
||||
//Turn off any active weapon effects when there are no targets found.
|
||||
// Turn off any active weapon effects when there are no targets found.
|
||||
fireTimer = 0;
|
||||
laser.enabled = false;
|
||||
GetComponent<Light>().enabled = false;
|
||||
|
||||
//Movement
|
||||
// Movement.
|
||||
if (Physics.Raycast(transform.position, transform.forward, out RaycastHit forwardHit, 1000))
|
||||
{
|
||||
transform.position += transform.up * 25 * Time.deltaTime;
|
||||
@ -116,7 +116,7 @@ public class Pirate : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//Targeting
|
||||
// Targeting.
|
||||
bool targetFound = false;
|
||||
GameObject[] allObjects = GameObject.FindGameObjectsWithTag("Built");
|
||||
foreach (GameObject obj in allObjects)
|
||||
@ -139,7 +139,7 @@ public class Pirate : MonoBehaviour
|
||||
}
|
||||
else if (destroying == false)
|
||||
{
|
||||
//Movement
|
||||
// Movement.
|
||||
Vector3 destination = targetLocation;
|
||||
destination.y = transform.position.y;
|
||||
if (Vector3.Distance(transform.position, targetLocation) > 2000)
|
||||
@ -166,7 +166,7 @@ public class Pirate : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//Firing
|
||||
// Firing.
|
||||
if (Vector3.Distance(transform.position, target.transform.position) < 1000)
|
||||
{
|
||||
fireTimer += 1 * Time.deltaTime;
|
||||
@ -322,5 +322,4 @@ public class Pirate : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.IO;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
//! This is the core class for the player which handles most of the player's interactions with the game.
|
||||
public class PlayerController : MonoBehaviour
|
||||
{
|
||||
private InputManager inputManager;
|
||||
@ -198,19 +199,19 @@ public class PlayerController : MonoBehaviour
|
||||
|
||||
private bool addedModMachines;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
// Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
//REFERENCE TO THE GAME AND STATE MANAGER
|
||||
//!REFERENCE TO THE GAME AND STATE MANAGER
|
||||
gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
|
||||
stateManager = GameObject.Find("GameManager").GetComponent<StateManager>();
|
||||
|
||||
|
||||
//INITIALIZE COMPONENT CLASSES
|
||||
// INITIALIZE COMPONENT CLASSES
|
||||
playerInventory = GetComponent<InventoryManager>();
|
||||
laserController = new LaserController(this, gameManager);
|
||||
|
||||
//LOAD MOUSE SETTINGS
|
||||
// LOAD MOUSE SETTINGS
|
||||
Cursor.visible = true;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
if (PlayerPrefs.GetFloat("xSensitivity") != 0)
|
||||
@ -248,7 +249,7 @@ public class PlayerController : MonoBehaviour
|
||||
blockSelector = new BlockSelector(this);
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (ReadyToLoadModMachines() == true)
|
||||
@ -324,7 +325,7 @@ public class PlayerController : MonoBehaviour
|
||||
destructionMessageReceived = false;
|
||||
}
|
||||
|
||||
//PIRATE ATTACK INCOMING
|
||||
// PIRATE ATTACK INCOMING
|
||||
if (pirateAttackWarningActive == true)
|
||||
{
|
||||
currentTabletMessage = "Warning! Warning! Warning! Warning! Warning!\n\nIncoming pirate attack!";
|
||||
@ -339,7 +340,7 @@ public class PlayerController : MonoBehaviour
|
||||
pirateAttackWarningReceived = false;
|
||||
}
|
||||
|
||||
//METEOR SHOWER INCOMING
|
||||
// METEOR SHOWER INCOMING
|
||||
if (meteorShowerWarningActive == true)
|
||||
{
|
||||
currentTabletMessage = "Warning! Warning! Warning! Warning! Warning!\n\nIncoming meteor shower!";
|
||||
@ -420,6 +421,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Returns true when prerequisites are met for loading machines added by mods.
|
||||
private bool ReadyToLoadModMachines()
|
||||
{
|
||||
return addedModMachines == false
|
||||
@ -429,7 +431,7 @@ public class PlayerController : MonoBehaviour
|
||||
&& LoadedModTextures();
|
||||
}
|
||||
|
||||
// Returns true if block dictionary is non null.
|
||||
//! Returns true if block dictionary is non null.
|
||||
private bool BlockDictionaryInitiazlied()
|
||||
{
|
||||
if (GetComponent<BuildController>() != null)
|
||||
@ -439,7 +441,7 @@ public class PlayerController : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns true when all mod textures have finished loading.
|
||||
//! Returns true when all mod textures have finished loading.
|
||||
private bool LoadedModTextures()
|
||||
{
|
||||
if (GetComponent<TextureDictionary>() != null)
|
||||
@ -449,7 +451,7 @@ public class PlayerController : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Saves the player's location and money.
|
||||
//! Saves the player's location and money.
|
||||
public void SavePlayerData()
|
||||
{
|
||||
PlayerPrefsX.SetVector3(stateManager.WorldName + "playerPosition", transform.position);
|
||||
@ -458,7 +460,7 @@ public class PlayerController : MonoBehaviour
|
||||
FileBasedPrefs.SetBool(stateManager.WorldName + "oldWorld", true);
|
||||
}
|
||||
|
||||
// Applies global settings.
|
||||
//! Applies global settings.
|
||||
public void ApplySettings()
|
||||
{
|
||||
PlayerPrefsX.SetPersistentBool("mouseInverted", GetComponent<MSCameraController>().CameraSettings.firstPerson.invertYInput);
|
||||
@ -472,7 +474,7 @@ public class PlayerController : MonoBehaviour
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
// Plays a sound.
|
||||
//! Plays a sound.
|
||||
public void PlayButtonSound()
|
||||
{
|
||||
guiSound.volume = 0.15f;
|
||||
@ -480,7 +482,7 @@ public class PlayerController : MonoBehaviour
|
||||
guiSound.Play();
|
||||
}
|
||||
|
||||
// Plays a sound.
|
||||
//! Plays a sound.
|
||||
public void PlayCraftingSound()
|
||||
{
|
||||
guiSound.volume = 0.3f;
|
||||
@ -488,7 +490,7 @@ public class PlayerController : MonoBehaviour
|
||||
guiSound.Play();
|
||||
}
|
||||
|
||||
// Plays a sound.
|
||||
//! Plays a sound.
|
||||
public void PlayMissingItemsSound()
|
||||
{
|
||||
guiSound.volume = 0.15f;
|
||||
@ -496,7 +498,7 @@ public class PlayerController : MonoBehaviour
|
||||
guiSound.Play();
|
||||
}
|
||||
|
||||
// Returns true if any GUI is open
|
||||
//! Returns true if any GUI is open.
|
||||
public bool GuiOpen()
|
||||
{
|
||||
return cGUI.showingInputGUI == true
|
||||
@ -508,7 +510,7 @@ public class PlayerController : MonoBehaviour
|
||||
|| (paintGunActive == true && paintColorSelected == false);
|
||||
}
|
||||
|
||||
// Returns true at the beginning of the first in-game day when the intro should be displayed on the tablet.
|
||||
//! Returns true at the beginning of the first in-game day when the intro should be displayed on the tablet.
|
||||
private bool ShouldShowTabletIntro()
|
||||
{
|
||||
return currentTabletMessage.Equals("")
|
||||
@ -516,7 +518,7 @@ public class PlayerController : MonoBehaviour
|
||||
&& (int)GameObject.Find("Rocket").GetComponent<Rocket>().gameTime < 200;
|
||||
}
|
||||
|
||||
// Displays the intro message on the tablet.
|
||||
//! Displays the intro message on the tablet.
|
||||
private void ShowTabletIntro()
|
||||
{
|
||||
currentTabletMessage = "To all deployed members of:\nQuantum Engineering, \nDark Matter Research, \nMoon Base Establishment Division" +
|
||||
@ -526,7 +528,7 @@ public class PlayerController : MonoBehaviour
|
||||
"Agrat Eirelis:" + "\n" + "Chief Officer," + "\n" + "Quantum Engineering," + "\n" + "Dark Matter Research," + "\n" + "Moon Base Establishment Division";
|
||||
}
|
||||
|
||||
// Moves the player to their previous location when a game is loaded.
|
||||
//! Moves the player to their previous location when a game is loaded.
|
||||
private void MovePlayerToSavedLocation()
|
||||
{
|
||||
transform.position = PlayerPrefsX.GetVector3(stateManager.WorldName + "playerPosition");
|
||||
@ -535,7 +537,7 @@ public class PlayerController : MonoBehaviour
|
||||
movedPlayer = true;
|
||||
}
|
||||
|
||||
// Opens the tablet to display a message the first time the world is loaded.
|
||||
//! Opens the tablet to display a message the first time the world is loaded.
|
||||
private void OpenTabletOnFirstLoad()
|
||||
{
|
||||
if (GetComponent<MainMenu>().finishedLoading == true)
|
||||
@ -551,7 +553,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Displays a message on the player's tablet when the rocket is landing to collect dark matter.
|
||||
//! Displays a message on the player's tablet when the rocket is landing to collect dark matter.
|
||||
private void DisplayDeliveryWarning()
|
||||
{
|
||||
deliveryWarningTimer += 1 * Time.deltaTime;
|
||||
@ -576,6 +578,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Stops the players building mode and sends a request to the game manager to recombine any edited combined meshes.
|
||||
private void HandleBuildingStopRequest()
|
||||
{
|
||||
if (gameManager.working == false)
|
||||
@ -595,7 +598,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Handles the sending of chunk load requests for modifying combined meshes.
|
||||
//! Handles the sending of chunk load requests for modifying combined meshes.
|
||||
private void ModifyCombinedMeshes()
|
||||
{
|
||||
destroyTimer += 1 * Time.deltaTime;
|
||||
@ -635,7 +638,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Handles requests to load chunks of blocks from combined meshes near the player.
|
||||
//! Handles requests to load chunks of blocks from combined meshes near the player.
|
||||
private void HandleChunkLoadRequest()
|
||||
{
|
||||
if (gameManager.working == false)
|
||||
@ -653,7 +656,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Handles requests to open the escape menu, stopping appropriate coroutines.
|
||||
//! Handles requests to open the escape menu, stopping appropriate coroutines.
|
||||
private void HandleEscapeMenuRequest()
|
||||
{
|
||||
if (building == true || destroying == true)
|
||||
@ -683,7 +686,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Enforces world size limitations.
|
||||
//! Enforces world size limitations.
|
||||
private void EnforceWorldLimits()
|
||||
{
|
||||
if (gameObject.transform.position.x > 4500)
|
||||
@ -712,7 +715,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Handles requests to exit the game
|
||||
//! Handles requests to exit the game
|
||||
private void HandleSaveRequest()
|
||||
{
|
||||
requestedSaveTimer += 1 * Time.deltaTime;
|
||||
@ -729,7 +732,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Closes the storage GUI if the player has moved too far from the container.
|
||||
//! Closes the storage GUI if the player has moved too far from the container.
|
||||
private void CheckStorageDistance()
|
||||
{
|
||||
if (remoteStorageActive == false)
|
||||
@ -750,7 +753,7 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Handles safely saving data and shutting down the game.
|
||||
//! Handles saving world and exiting to the main menu.
|
||||
public static IEnumerator Save()
|
||||
{
|
||||
float f = 0;
|
||||
|
35
PlayerGUI.cs
35
PlayerGUI.cs
@ -18,7 +18,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
private bool schematic6;
|
||||
private bool schematic7;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
playerController = GetComponent<PlayerController>();
|
||||
@ -29,7 +29,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
guiCoordinates = new GuiCoordinates();
|
||||
}
|
||||
|
||||
// Returns true if the escape menu should be displayed.
|
||||
//! Returns true if the escape menu should be displayed.
|
||||
private bool MenuAvailable()
|
||||
{
|
||||
return playerController.helpMenuOpen == false
|
||||
@ -41,6 +41,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
&& stateManager.saving == false;
|
||||
}
|
||||
|
||||
//! Returns true if the block is a building block, used with combined meshes.
|
||||
private bool IsStandardBlock(string type)
|
||||
{
|
||||
return type == "Brick"
|
||||
@ -51,6 +52,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
|| type == "Steel Ramp";
|
||||
}
|
||||
|
||||
//! Returns true if the saving world message should be displayed.
|
||||
private bool SavingMessageRequired()
|
||||
{
|
||||
return playerController.exiting == true
|
||||
@ -59,6 +61,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
|| stateManager.saving == true;
|
||||
}
|
||||
|
||||
//! Returns true if a tablet notification should be displayed.
|
||||
private bool TabletNotificationRequired()
|
||||
{
|
||||
return playerController.meteorShowerWarningActive == true
|
||||
@ -67,6 +70,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
|| playerController.destructionMessageActive == true;
|
||||
}
|
||||
|
||||
//! Stops displaying schematics when the menu is closed.
|
||||
private void ClearSchematic()
|
||||
{
|
||||
schematic1 = false;
|
||||
@ -78,6 +82,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
schematic7 = false;
|
||||
}
|
||||
|
||||
//! Returns true if any schematic is being displayed.
|
||||
private bool SchematicActive()
|
||||
{
|
||||
return schematic1 == true
|
||||
@ -89,13 +94,13 @@ public class PlayerGUI : MonoBehaviour
|
||||
|| schematic7 == true;
|
||||
}
|
||||
|
||||
// Called by unity engine for rendering and handling GUI events
|
||||
//! Called by unity engine for rendering and handling GUI events.
|
||||
public void OnGUI()
|
||||
{
|
||||
//STYLE
|
||||
// STYLE
|
||||
GUI.skin = thisGUIskin;
|
||||
|
||||
//ASPECT RATIO
|
||||
// ASPECT RATIO
|
||||
float ScreenHeight = Screen.height;
|
||||
float ScreenWidth = Screen.width;
|
||||
if (ScreenWidth / ScreenHeight < 1.7f)
|
||||
@ -109,7 +114,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
|
||||
if (playerController.stateManager.worldLoaded == true && GetComponent<MainMenu>().finishedLoading == true)
|
||||
{
|
||||
//BUILD ITEM HUD AT TOP RIGHT OF SCREEN
|
||||
// BUILD ITEM HUD AT TOP RIGHT OF SCREEN
|
||||
if (playerController.displayingBuildItem == true)
|
||||
{
|
||||
GUI.Label(guiCoordinates.topRightInfoRect, "\n\nBuild item set to " + playerController.buildType);
|
||||
@ -129,13 +134,13 @@ public class PlayerGUI : MonoBehaviour
|
||||
GUI.Label(guiCoordinates.buildItemCountRect, "" + buildItemCount);
|
||||
}
|
||||
|
||||
//METEOR SHOWER WARNINGS
|
||||
// METEOR SHOWER WARNINGS
|
||||
if (TabletNotificationRequired())
|
||||
{
|
||||
GUI.Label(guiCoordinates.topLeftInfoRect, "Urgent message received! Check your tablet for more information.");
|
||||
}
|
||||
|
||||
//TABLET
|
||||
// TABLET
|
||||
if (playerController.tabletOpen == true)
|
||||
{
|
||||
int day = GameObject.Find("Rocket").GetComponent<Rocket>().day;
|
||||
@ -169,7 +174,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//OPTIONS/EXIT MENU
|
||||
// OPTIONS/EXIT MENU
|
||||
if (playerController.escapeMenuOpen == true)
|
||||
{
|
||||
if (MenuAvailable())
|
||||
@ -219,7 +224,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//HELP MENU
|
||||
// HELP MENU
|
||||
if (playerController.helpMenuOpen == true)
|
||||
{
|
||||
if (playerController.videoMenuOpen == false && playerController.schematicMenuOpen == false)
|
||||
@ -445,7 +450,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//OPTIONS MENU
|
||||
// OPTIONS MENU
|
||||
if (playerController.optionsGUIopen == true && cGUI.showingInputGUI == false)
|
||||
{
|
||||
GUI.DrawTexture(guiCoordinates.optionsMenuBackgroundRect, textureDictionary.dictionary["Menu Background"]);
|
||||
@ -602,7 +607,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//BUILDING INSTRUCTIONS
|
||||
// BUILDING INSTRUCTIONS
|
||||
if (playerController.building == true && playerController.tabletOpen == false)
|
||||
{
|
||||
GUI.DrawTexture(guiCoordinates.buildInfoRectBG, textureDictionary.dictionary["Interface Background"]);
|
||||
@ -629,7 +634,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//PAINT COLOR SELECTION WINDOW
|
||||
// PAINT COLOR SELECTION WINDOW
|
||||
if (playerController.paintGunActive == true)
|
||||
{
|
||||
if (playerController.paintColorSelected == false)
|
||||
@ -674,7 +679,7 @@ public class PlayerGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//CROSSHAIR
|
||||
// CROSSHAIR
|
||||
if (!playerController.inventoryOpen && !playerController.machineGUIopen && !playerController.marketGUIopen)
|
||||
{
|
||||
if (!playerController.escapeMenuOpen && !playerController.tabletOpen && !playerController.paintGunActive)
|
||||
@ -694,4 +699,4 @@ public class PlayerGUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ public class PluginLoader :MonoBehaviour
|
||||
{
|
||||
private Assembly assembly;
|
||||
|
||||
// Adds plugins from mods to the game.
|
||||
//! Adds plugins from mods to the game.
|
||||
public void Start()
|
||||
{
|
||||
string modPath = Path.Combine(Application.persistentDataPath, "Mods");
|
||||
@ -28,13 +28,13 @@ public class PluginLoader :MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Starts the assembly loading coroutine.
|
||||
//! Starts the assembly loading coroutine.
|
||||
private void LoadPlugin(string pluginName, string url)
|
||||
{
|
||||
StartCoroutine(LoadAssembly(pluginName, url));
|
||||
}
|
||||
|
||||
// Uses GetAssembly to load classes from the dll and add them to a dictionary.
|
||||
//! Uses GetAssembly to load classes from the dll and add them to a dictionary.
|
||||
private IEnumerator LoadAssembly(string pluginName, string url)
|
||||
{
|
||||
if(url == null)
|
||||
@ -56,7 +56,7 @@ public class PluginLoader :MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Loads assembly from file.
|
||||
//! Loads assembly from file.
|
||||
private Assembly GetAssembly(UnityWebRequest uwr)
|
||||
{
|
||||
if (uwr != null)
|
||||
@ -72,7 +72,7 @@ public class PluginLoader :MonoBehaviour
|
||||
return null;
|
||||
}
|
||||
|
||||
// Gets type by name from dll.
|
||||
//! Gets type by name from dll.
|
||||
private void AddPlugin(Assembly dll, string pluginName)
|
||||
{
|
||||
Type type = dll.GetType(pluginName);
|
||||
|
@ -26,7 +26,7 @@ public class PowerConduit : MonoBehaviour
|
||||
private GameObject builtObjects;
|
||||
public PowerReceiver powerReceiver;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
connectionLine = gameObject.AddComponent<LineRenderer>();
|
||||
@ -40,7 +40,7 @@ public class PowerConduit : MonoBehaviour
|
||||
outputObjects = new GameObject[] { outputObject1, outputObject2 };
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -123,7 +123,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Used to de-energize output objects when the power conduit is destroyed.
|
||||
//! Used to de-energize output objects when the power conduit is destroyed.
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (connectionLine2 != null)
|
||||
@ -156,7 +156,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
@ -170,7 +170,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! The object exists, is active and is not a standard building block.
|
||||
bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -180,7 +180,7 @@ public class PowerConduit : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Creates a line renderer to the second output object
|
||||
//! Creates a line renderer to the second output object
|
||||
private void CreateOutput2ConnectionLine()
|
||||
{
|
||||
connectionLine2 = Instantiate(connectionObject, outputObject2.transform.position, outputObject2.transform.rotation);
|
||||
@ -194,7 +194,7 @@ public class PowerConduit : MonoBehaviour
|
||||
connectionLine2.GetComponent<LineRenderer>().SetPosition(1, outputObject2.transform.position);
|
||||
}
|
||||
|
||||
// Connects to a another power conduit.
|
||||
//! Connects to a another power conduit.
|
||||
private void ConnectOutputOneToConduit(GameObject obj)
|
||||
{
|
||||
if (obj != gameObject)
|
||||
@ -251,7 +251,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Connects to a another power conduit.
|
||||
//! Connects to a another power conduit.
|
||||
private void ConnectOutputTwoToConduit(GameObject obj)
|
||||
{
|
||||
if (obj != gameObject)
|
||||
@ -308,7 +308,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Designates conduit as an output with assigned ID
|
||||
//! Designates conduit as an output with assigned ID.
|
||||
private void InitializeOutputConduitOne(GameObject obj)
|
||||
{
|
||||
outputObject1 = obj;
|
||||
@ -321,7 +321,7 @@ public class PowerConduit : MonoBehaviour
|
||||
connectionLine.enabled = true;
|
||||
}
|
||||
|
||||
// Designates conduit as an output with assigned ID
|
||||
//! Designates conduit as an output with assigned ID.
|
||||
private void InitializeOutputConduitTwo(GameObject obj)
|
||||
{
|
||||
outputObject2 = obj;
|
||||
@ -332,7 +332,7 @@ public class PowerConduit : MonoBehaviour
|
||||
CreateOutput2ConnectionLine();
|
||||
}
|
||||
|
||||
// Attempts to connect to a another power conduit.
|
||||
//! Attempts to connect to a another power conduit.
|
||||
private void AttemptConduitOneConnection(GameObject obj)
|
||||
{
|
||||
if (creationMethod.Equals("spawned") && obj.GetComponent<PowerConduit>().ID.Equals(outputID1))
|
||||
@ -346,7 +346,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Attempts to connect to a another power conduit.
|
||||
//! Attempts to connect to a another power conduit.
|
||||
private void AttemptConduitTwoConnection(GameObject obj)
|
||||
{
|
||||
if (creationMethod.Equals("spawned") && obj.GetComponent<PowerConduit>().ID.Equals(outputID2))
|
||||
@ -360,7 +360,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Designates machine as an output with assigned ID.
|
||||
//! Designates machine as an output with assigned ID.
|
||||
private void InitializeMachineOneConnection(GameObject obj)
|
||||
{
|
||||
outputObject1 = obj;
|
||||
@ -371,7 +371,7 @@ public class PowerConduit : MonoBehaviour
|
||||
connectionLine.enabled = true;
|
||||
}
|
||||
|
||||
// Attempts to connect to a machine.
|
||||
//! Attempts to connect to a machine.
|
||||
private void AttemptMachineOneConnection(GameObject obj)
|
||||
{
|
||||
if (creationMethod.Equals("spawned") && obj.GetComponent<PowerReceiver>().ID.Equals(outputID1))
|
||||
@ -385,7 +385,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Designates machine as an output with assigned ID.
|
||||
//! Designates machine as an output with assigned ID.
|
||||
private void InitializeMachineTwoConnection(GameObject obj)
|
||||
{
|
||||
outputObject2 = obj;
|
||||
@ -394,7 +394,7 @@ public class PowerConduit : MonoBehaviour
|
||||
CreateOutput2ConnectionLine();
|
||||
}
|
||||
|
||||
// Attempts to connect to a machine.
|
||||
//! Attempts to connect to a machine.
|
||||
private void AttemptMachineTwoConnection(GameObject obj)
|
||||
{
|
||||
if (creationMethod.Equals("spawned") && obj.GetComponent<PowerReceiver>().ID.Equals(outputID2))
|
||||
@ -408,7 +408,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Makes connections from this conduit to another conduti or a machine.
|
||||
//! Makes connections from this conduit to another conduti or a machine.
|
||||
private void UpdateOutputOne()
|
||||
{
|
||||
connectionAttempts += 1;
|
||||
@ -456,7 +456,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Makes connections from this conduit to another conduit or a machine.
|
||||
//! Makes connections from this conduit to another conduit or a machine.
|
||||
private void UpdateOutputTwo()
|
||||
{
|
||||
dualConnectionAttempts += 1;
|
||||
@ -501,7 +501,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Distributes power to output 1
|
||||
//! Distributes power to output 1.
|
||||
private void DistributePowerToConnectionOne()
|
||||
{
|
||||
if (outputObject1.GetComponent<PowerReceiver>() != null)
|
||||
@ -543,7 +543,7 @@ public class PowerConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Distributes power to output 2
|
||||
//! Distributes power to output 2.
|
||||
private void DistributePowerToConnectionTwo()
|
||||
{
|
||||
if (outputObject2.GetComponent<PowerReceiver>() != null)
|
||||
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class is attached to any machine that requires power to operate.
|
||||
public class PowerReceiver : MonoBehaviour
|
||||
{
|
||||
public string ID = "unassigned";
|
||||
|
@ -26,7 +26,8 @@ public class PowerSource : MonoBehaviour
|
||||
public Texture2D generatorOnTexture;
|
||||
private GameObject builtObjects;
|
||||
|
||||
void Start()
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
connectionLine = gameObject.AddComponent<LineRenderer>();
|
||||
connectionLine.startWidth = 0.2f;
|
||||
@ -37,7 +38,8 @@ public class PowerSource : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
void Update()
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
if (updateTick > 0.5f + (address * 0.001f))
|
||||
@ -86,7 +88,8 @@ public class PowerSource : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
//! Used to notify power receivers when the power source is destroyed.
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (outputObject != null && outputObject.GetComponent<PowerReceiver>() != null)
|
||||
{
|
||||
@ -102,7 +105,8 @@ public class PowerSource : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
bool IsValidObject(GameObject obj)
|
||||
//! Returns true if the object exists, is active and is not a standard building block.
|
||||
private bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
@ -111,6 +115,7 @@ public class PowerSource : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Connects the power source to a power receiver.
|
||||
private void ConnectToOutput(GameObject obj)
|
||||
{
|
||||
float distance = Vector3.Distance(transform.position, obj.transform.position);
|
||||
@ -169,6 +174,7 @@ public class PowerSource : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Determines the type of power source and calls the appropriate power distribution method.
|
||||
private void DistributePower()
|
||||
{
|
||||
if (outputObject.GetComponent<PowerReceiver>() != null)
|
||||
@ -191,6 +197,7 @@ public class PowerSource : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Distributes power to power receivers as a solar panel.
|
||||
private void DistributeAsSolarPanel()
|
||||
{
|
||||
Vector3 sunPosition = new Vector3(7000, 15000, -10000);
|
||||
@ -223,6 +230,7 @@ public class PowerSource : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Distributes power to power receivers as a generator.
|
||||
private void DistributeAsGenerator()
|
||||
{
|
||||
if (fuelType.Equals("Coal") && fuelAmount >= 1)
|
||||
@ -269,6 +277,7 @@ public class PowerSource : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Distributes power to power receivers as reactor turbine.
|
||||
private void DistributeAsReactorTurbine()
|
||||
{
|
||||
bool reactorFound = false;
|
||||
@ -315,5 +324,4 @@ public class PowerSource : MonoBehaviour
|
||||
GetComponent<AudioSource>().Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
4
Press.cs
4
Press.cs
@ -4,7 +4,7 @@ using System.Linq;
|
||||
|
||||
public class Press : BasicMachine
|
||||
{
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public new void Start()
|
||||
{
|
||||
base.Start();
|
||||
@ -33,7 +33,7 @@ public class Press : BasicMachine
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine
|
||||
public new void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class handles animation of the hammer and piston of a press.
|
||||
public class PressHammer : MonoBehaviour
|
||||
{
|
||||
public GameObject press;
|
||||
@ -8,14 +9,14 @@ public class PressHammer : MonoBehaviour
|
||||
bool movingUp;
|
||||
bool soundPlayed;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
//! Start is called before the first frame update.
|
||||
public void Start()
|
||||
{
|
||||
originalYposition = transform.position.y;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
//! Update is called once per frame.
|
||||
public void Update()
|
||||
{
|
||||
if (press.GetComponent<Light>().enabled == true)
|
||||
{
|
||||
@ -48,4 +49,4 @@ public class PressHammer : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class handles animation of the robotic arm of the auto crafter machine.
|
||||
public class PrintingArm : MonoBehaviour
|
||||
{
|
||||
public GameObject autoCrafter;
|
||||
@ -12,14 +13,14 @@ public class PrintingArm : MonoBehaviour
|
||||
bool soundPlayed;
|
||||
float timer;
|
||||
|
||||
// Start is called before the first frame update
|
||||
//! Start is called before the first frame update.
|
||||
void Start()
|
||||
{
|
||||
horizontalArmStartPosition = horizontalArm.transform.position;
|
||||
verticalArmStartPosition = verticalArm.transform.position;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
//! Update is called once per frame.
|
||||
void Update()
|
||||
{
|
||||
if (autoCrafter.GetComponent<AutoCrafter>().inputObject != null)
|
||||
@ -38,7 +39,6 @@ public class PrintingArm : MonoBehaviour
|
||||
{
|
||||
if (soundPlayed == false)
|
||||
{
|
||||
//retriever.GetComponent<AudioSource>().Play();
|
||||
soundPlayed = true;
|
||||
}
|
||||
horizontalArm.transform.position += horizontalArm.transform.right * 1 * Time.deltaTime;
|
||||
@ -74,7 +74,7 @@ public class PrintingArm : MonoBehaviour
|
||||
{
|
||||
if (soundPlayed == false)
|
||||
{
|
||||
//retriever.GetComponent<AudioSource>().Play();
|
||||
//!retriever.GetComponent<AudioSource>().Play();
|
||||
soundPlayed = true;
|
||||
}
|
||||
horizontalArm.transform.position -= horizontalArm.transform.right * 1 * Time.deltaTime;
|
||||
@ -119,4 +119,4 @@ public class PrintingArm : MonoBehaviour
|
||||
laser.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
README.md.meta
Normal file
7
README.md.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01f3c751325a6fa048f29fdc321587f7
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -12,13 +12,13 @@ public class RailCart : MonoBehaviour
|
||||
private float stopTimer;
|
||||
private GameObject builtObjects;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
GetComponent<InventoryManager>().ID = ID;
|
||||
|
@ -21,7 +21,7 @@ public class RailCartHub : MonoBehaviour
|
||||
public bool connectionFailed;
|
||||
public bool centralHub;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
connectionLine = gameObject.AddComponent<LineRenderer>();
|
||||
@ -32,7 +32,7 @@ public class RailCartHub : MonoBehaviour
|
||||
connectionLine.enabled = false;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -90,7 +90,7 @@ public class RailCartHub : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if this hub is ready to connect to the next
|
||||
//! Returns true if this hub is ready to connect to the next.
|
||||
private bool ReadyToConnect()
|
||||
{
|
||||
if (outputObject == null)
|
||||
@ -100,7 +100,7 @@ public class RailCartHub : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns true if the hub in question is a potential connection
|
||||
//! Returns true if the hub in question is a potential connection.
|
||||
private bool CanConnect(RailCartHub hub)
|
||||
{
|
||||
if (centralHub == true)
|
||||
@ -110,7 +110,7 @@ public class RailCartHub : MonoBehaviour
|
||||
return hub.gameObject != inputObject && hub.gameObject != gameObject && hub.inputObject == null;
|
||||
}
|
||||
|
||||
// Finds the first hub within range
|
||||
//! Finds the first hub within range.
|
||||
private void FindConnection()
|
||||
{
|
||||
RailCartHub[] allHubs = FindObjectsOfType<RailCartHub>();
|
||||
|
22
Retriever.cs
22
Retriever.cs
@ -38,7 +38,7 @@ public class Retriever : MonoBehaviour
|
||||
public PowerReceiver powerReceiver;
|
||||
private GameObject builtObjects;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
@ -52,7 +52,7 @@ public class Retriever : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -127,7 +127,7 @@ public class Retriever : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Used to remove line renderers and conduit item sprites when the machine is destroyed.
|
||||
//! Used to remove line renderers and conduit item sprites when the machine is destroyed.
|
||||
void OnDestroy()
|
||||
{
|
||||
if (spawnedConnection != null)
|
||||
@ -140,7 +140,7 @@ public class Retriever : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
@ -149,7 +149,7 @@ public class Retriever : MonoBehaviour
|
||||
powerObject = powerReceiver.powerObject;
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block.
|
||||
//! The object exists, is active and is not a standard building block.
|
||||
private bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -159,13 +159,13 @@ public class Retriever : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// The object is a potential output connection.
|
||||
//! The object is a potential output connection.
|
||||
private bool IsValidOutputConduit(GameObject obj)
|
||||
{
|
||||
return outputObject == null && inputObject != null && obj.GetComponent<UniversalConduit>().inputObject == null;
|
||||
}
|
||||
|
||||
// Returns true if the object in question is a storage container.
|
||||
//! Returns true if the object in question is a storage container.
|
||||
private bool IsStorageContainer(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -181,7 +181,7 @@ public class Retriever : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Connects the retriever to an inventory manager for input and a conduit for output.
|
||||
//! Connects the retriever to an inventory manager for input and a conduit for output.
|
||||
private void MakeConnections()
|
||||
{
|
||||
GameObject[] allObjects = GameObject.FindGameObjectsWithTag("Built");
|
||||
@ -299,7 +299,7 @@ public class Retriever : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieves items.
|
||||
//! Retrieves items.
|
||||
private void RetrieveItems()
|
||||
{
|
||||
if (inputObject != null)
|
||||
@ -320,7 +320,7 @@ public class Retriever : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieves items from storage containers.
|
||||
//! Retrieves items from storage containers.
|
||||
private void RetrieveFromStorageContainer()
|
||||
{
|
||||
if (inputObject.GetComponent<RailCart>() != null)
|
||||
@ -451,7 +451,7 @@ public class Retriever : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//Retrieves items from storage computers.
|
||||
//!Retrieves items from storage computers.
|
||||
private void RetrieveFromStorageComputer()
|
||||
{
|
||||
inputID = inputObject.GetComponent<StorageComputer>().ID;
|
||||
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class handles automation of the retriever's robotic arm.
|
||||
public class RoboticArm : MonoBehaviour
|
||||
{
|
||||
public GameObject retriever;
|
||||
@ -10,13 +11,13 @@ public class RoboticArm : MonoBehaviour
|
||||
bool soundPlayed;
|
||||
float timer;
|
||||
|
||||
// Start is called before the first frame update
|
||||
//! Start is called before the first frame update.
|
||||
void Start()
|
||||
{
|
||||
rotationPoint = rotationTransform.position;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
//! Update is called once per frame.
|
||||
void Update()
|
||||
{
|
||||
if (retriever.GetComponent<Retriever>().inputObject != null && retriever.GetComponent<Retriever>().outputObject != null)
|
||||
@ -35,7 +36,6 @@ public class RoboticArm : MonoBehaviour
|
||||
{
|
||||
if (soundPlayed == false)
|
||||
{
|
||||
//retriever.GetComponent<AudioSource>().Play();
|
||||
soundPlayed = true;
|
||||
}
|
||||
item.GetComponent<Renderer>().enabled = true;
|
||||
@ -92,4 +92,4 @@ public class RoboticArm : MonoBehaviour
|
||||
item.GetComponent<Renderer>().enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
Rocket.cs
13
Rocket.cs
@ -14,13 +14,13 @@ public class Rocket : MonoBehaviour
|
||||
private bool initialized;
|
||||
public bool rocketRequested;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
player = GameObject.Find("Player").GetComponent<PlayerController>();
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (GameObject.Find("GameManager").GetComponent<StateManager>().worldLoaded == true)
|
||||
@ -71,6 +71,7 @@ public class Rocket : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Initializes variables when the world is loaded.
|
||||
private void Init()
|
||||
{
|
||||
if (FileBasedPrefs.GetInt(GameObject.Find("GameManager").GetComponent<StateManager>().WorldName + "payloadRequired") != 0)
|
||||
@ -85,6 +86,7 @@ public class Rocket : MonoBehaviour
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
//! Checks the cargo of the rocket for the required amount of dark matter.
|
||||
private void CheckCargo()
|
||||
{
|
||||
int amountInRocket = 0;
|
||||
@ -109,6 +111,7 @@ public class Rocket : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Called at the end of a day to increase the payload required for the next day.
|
||||
private void EndOfDay()
|
||||
{
|
||||
day += 1;
|
||||
@ -122,6 +125,7 @@ public class Rocket : MonoBehaviour
|
||||
player.timeToDeliver = true;
|
||||
}
|
||||
|
||||
//! Resets the rocket when it leaves the area, disabling all sounds and rendering and clearing the inventory.
|
||||
private void Reset()
|
||||
{
|
||||
ClearInventory();
|
||||
@ -135,6 +139,7 @@ public class Rocket : MonoBehaviour
|
||||
exhaust.SetActive(false);
|
||||
}
|
||||
|
||||
//! Moves the rocket in the positive Y direction.
|
||||
private void Ascend()
|
||||
{
|
||||
GetComponent<AudioSource>().enabled = true;
|
||||
@ -142,6 +147,7 @@ public class Rocket : MonoBehaviour
|
||||
transform.position += transform.up * 25 * Time.deltaTime;
|
||||
}
|
||||
|
||||
//! Moves the rocket in the negative Y direction.
|
||||
private void Descend()
|
||||
{
|
||||
if (visible == false)
|
||||
@ -162,6 +168,7 @@ public class Rocket : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Empty the rocket's inventory.
|
||||
private void ClearInventory()
|
||||
{
|
||||
foreach (InventorySlot s in GetComponent<InventoryManager>().inventory)
|
||||
@ -172,6 +179,7 @@ public class Rocket : MonoBehaviour
|
||||
GetComponent<InventoryManager>().SaveData();
|
||||
}
|
||||
|
||||
//! Disable all renderers attached to the rocket, so it is no longer visible.
|
||||
private void DisableRenderers()
|
||||
{
|
||||
if (visible == true)
|
||||
@ -188,6 +196,7 @@ public class Rocket : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Enabled all renderers attached to the rocket, making it visible.
|
||||
private void EnableRenderers()
|
||||
{
|
||||
Renderer[] renderers = GetComponentsInChildren<Renderer>(true);
|
||||
|
@ -6,11 +6,13 @@ public class SaveManager
|
||||
{
|
||||
private StateManager stateManager;
|
||||
|
||||
//! This class handles world saving.
|
||||
public SaveManager(StateManager stateManager)
|
||||
{
|
||||
this.stateManager = stateManager;
|
||||
}
|
||||
|
||||
//! Saves the world.
|
||||
public IEnumerator SaveDataCoroutine()
|
||||
{
|
||||
stateManager.dataSaved = false;
|
||||
@ -546,5 +548,4 @@ public class SaveManager
|
||||
stateManager.dataSaved = true;
|
||||
stateManager.saving = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class handles repositioning of the scanner in first person view, based on FOV.
|
||||
public class ScannerOffset : MonoBehaviour
|
||||
{
|
||||
public GameObject standardScanner;
|
||||
public GameObject adjustedScanner;
|
||||
public GameObject adjustedScanner2;
|
||||
|
||||
void Update()
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
if (Camera.main.fieldOfView > 66.6667 && Camera.main.fieldOfView < 73.3334)
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
|
||||
public class Smelter : BasicMachine
|
||||
{
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public new void Start()
|
||||
{
|
||||
base.Start();
|
||||
@ -31,7 +31,7 @@ public class Smelter : BasicMachine
|
||||
}
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public new void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
@ -4,7 +4,7 @@ public class SmelterFire : MonoBehaviour
|
||||
{
|
||||
public GameObject fireObject;
|
||||
|
||||
// Update is called once per frame
|
||||
//! Update is called once per frame.
|
||||
public void Update()
|
||||
{
|
||||
if (GetComponent<Light>().enabled == true)
|
||||
|
@ -1,8 +1,8 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class handles unique ID assignment and saving & loading of worlds.
|
||||
public class StateManager : MonoBehaviour
|
||||
{
|
||||
//BUILDING
|
||||
public bool saving;
|
||||
public bool dataSaved;
|
||||
public bool worldLoaded;
|
||||
@ -55,13 +55,13 @@ public class StateManager : MonoBehaviour
|
||||
private Coroutine addressingCoroutine;
|
||||
private Coroutine saveCoroutine;
|
||||
|
||||
// Called by unity engine before the first update.
|
||||
//! Called by unity engine before the first update.
|
||||
public void Start()
|
||||
{
|
||||
saveManager = new SaveManager(this);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
//! Update is called once per frame.
|
||||
public void Update()
|
||||
{
|
||||
MainMenu mainMenu = GameObject.Find("Player").GetComponent<MainMenu>();
|
||||
@ -89,7 +89,7 @@ public class StateManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Loads a saved world.
|
||||
//! Loads a saved world.
|
||||
private void LoadWorld()
|
||||
{
|
||||
if (Loaded == false && PlayerPrefsX.GetIntArray(WorldName + "idList").Length > 0)
|
||||
@ -453,20 +453,20 @@ public class StateManager : MonoBehaviour
|
||||
GameObject.Find("GameManager").GetComponent<GameManager>().meshManager.CombineBlocks();
|
||||
}
|
||||
|
||||
// Assigns ID to objects in the world.
|
||||
//! Assigns ID to objects in the world.
|
||||
private void AssignIDs()
|
||||
{
|
||||
addressingCoroutine = StartCoroutine(addressManager.AddressingCoroutine());
|
||||
}
|
||||
|
||||
// Saves the game.
|
||||
//! Saves the game.
|
||||
public void SaveData()
|
||||
{
|
||||
if (assigningIDs == false)
|
||||
saveCoroutine = StartCoroutine(saveManager.SaveDataCoroutine());
|
||||
}
|
||||
|
||||
// Returns true if the object in question is a storage container.
|
||||
//! Returns true if the object in question is a storage container.
|
||||
public bool IsStorageContainer(GameObject go)
|
||||
{
|
||||
return go.GetComponent<InventoryManager>() != null
|
||||
@ -475,4 +475,4 @@ public class StateManager : MonoBehaviour
|
||||
&& go.GetComponent<Retriever>() == null
|
||||
&& go.GetComponent<AutoCrafter>() == null;
|
||||
}
|
||||
}
|
||||
}
|
3
Steel.cs
3
Steel.cs
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class is attached to all steel block prefabs.
|
||||
public class Steel : MonoBehaviour
|
||||
{
|
||||
public string ID = "unassigned";
|
||||
@ -7,7 +8,7 @@ public class Steel : MonoBehaviour
|
||||
public int address;
|
||||
private float updateTick;
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
|
@ -18,7 +18,7 @@ public class StorageComputer : MonoBehaviour
|
||||
public ConduitItem conduitItem;
|
||||
public PowerReceiver powerReceiver;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
@ -27,7 +27,7 @@ public class StorageComputer : MonoBehaviour
|
||||
conduitItem = GetComponentInChildren<ConduitItem>(true);
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -66,7 +66,7 @@ public class StorageComputer : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called when player interacts with the computer.
|
||||
//! Called when player interacts with the computer.
|
||||
public void GetContainers()
|
||||
{
|
||||
computerContainerList.Clear();
|
||||
@ -103,7 +103,7 @@ public class StorageComputer : MonoBehaviour
|
||||
computerContainers = computerContainerList.ToArray();
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
@ -111,7 +111,7 @@ public class StorageComputer : MonoBehaviour
|
||||
powerObject = powerReceiver.powerObject;
|
||||
}
|
||||
|
||||
// Removes all connections and allows the computer to search for storage containers.
|
||||
//! Removes all connections and allows the computer to search for storage containers.
|
||||
public void Reboot()
|
||||
{
|
||||
GameObject[] spawnedConnections = spawnedConnectionList.ToArray();
|
||||
@ -126,7 +126,7 @@ public class StorageComputer : MonoBehaviour
|
||||
bootTimer = 0;
|
||||
}
|
||||
|
||||
// Removes line renderers when the machine is destroyed.
|
||||
//! Removes line renderers when the machine is destroyed.
|
||||
public void OnDestroy()
|
||||
{
|
||||
GameObject[] spawnedConnections = spawnedConnectionList.ToArray();
|
||||
@ -138,4 +138,4 @@ public class StorageComputer : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -5,12 +5,15 @@ public class StorageInteraction
|
||||
private PlayerController playerController;
|
||||
private InteractionController interactionController;
|
||||
|
||||
//! This class handles the player's interactions with storage containers.
|
||||
public StorageInteraction(PlayerController playerController, InteractionController interactionController)
|
||||
{
|
||||
this.playerController = playerController;
|
||||
this.interactionController = interactionController;
|
||||
}
|
||||
|
||||
|
||||
//! Called when the player is looking at a storage container.
|
||||
public void InteractWithStorageContainer()
|
||||
{
|
||||
if (cInput.GetKeyDown("Interact"))
|
||||
@ -94,6 +97,7 @@ public class StorageInteraction
|
||||
}
|
||||
}
|
||||
|
||||
//! Called when the player is looking at a storage computer.
|
||||
public void InteractWithStorageComputer()
|
||||
{
|
||||
playerController.machineInSight = playerController.objectInSight;
|
||||
@ -161,4 +165,4 @@ public class StorageInteraction
|
||||
interactionController.CollectObject("Storage Computer");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -5,13 +5,14 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
//! This class provides loading of textures by name from Resources or Application.persistentDataPath.
|
||||
public class TextureDictionary : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, Texture2D> dictionary;
|
||||
private Coroutine modTextureCoroutine;
|
||||
public bool addedModTextures;
|
||||
|
||||
// Loads textures from files for mods.
|
||||
//! Loads textures from files for mods.
|
||||
public static IEnumerator AddModTextures(Dictionary<string, Texture2D> dictionary)
|
||||
{
|
||||
string modPath = Path.Combine(Application.persistentDataPath, "Mods");
|
||||
@ -41,7 +42,7 @@ public class TextureDictionary : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Called by unity engine to initialize variables on startup.
|
||||
//! Called by unity engine to initialize variables on startup.
|
||||
public void Start()
|
||||
{
|
||||
dictionary = new Dictionary<string, Texture2D>
|
||||
|
@ -1,10 +1,11 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class handles animations for reactor turbines.
|
||||
public class TurbineImpeller : MonoBehaviour
|
||||
{
|
||||
public GameObject turbine;
|
||||
|
||||
// Update is called once per frame
|
||||
//! Update is called once per frame.
|
||||
void Update()
|
||||
{
|
||||
if (turbine.GetComponent<AudioSource>().isPlaying == true)
|
||||
|
@ -27,7 +27,7 @@ public class Turret : MonoBehaviour
|
||||
private LineRenderer laser;
|
||||
public PowerReceiver powerReceiver;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
@ -41,7 +41,7 @@ public class Turret : MonoBehaviour
|
||||
restingRotation = barrel.transform.rotation;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -121,7 +121,7 @@ public class Turret : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Fires at all targets on the target list
|
||||
//! Fires at all targets on the target list.
|
||||
private IEnumerator Fire()
|
||||
{
|
||||
firing = true;
|
||||
@ -222,7 +222,7 @@ public class Turret : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
|
@ -27,7 +27,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
private LineRenderer connectionLine;
|
||||
private float updateTick;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
connectionLine = gameObject.AddComponent<LineRenderer>();
|
||||
@ -40,7 +40,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
@ -117,7 +117,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is not a standard building block
|
||||
//! The object exists, is active and is not a standard building block.
|
||||
private bool IsValidObject(GameObject obj)
|
||||
{
|
||||
if (obj != null)
|
||||
@ -127,13 +127,13 @@ public class UniversalConduit : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// The object is a potential output connection
|
||||
//! The object is a potential output connection.
|
||||
private bool IsValidOutputObject(GameObject obj)
|
||||
{
|
||||
return outputObject == null && inputObject != null && obj != inputObject && obj != gameObject;
|
||||
}
|
||||
|
||||
// Returns true if the object in question is a storage container
|
||||
//! Returns true if the object in question is a storage container.
|
||||
private bool IsStorageContainer(GameObject obj)
|
||||
{
|
||||
if (obj.GetComponent<InventoryManager>() != null)
|
||||
@ -143,7 +143,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
// Puts items into a storage container or other object with attached inventory manager.
|
||||
//! Puts items into a storage container or other object with attached inventory manager.
|
||||
private void OutputToInventory()
|
||||
{
|
||||
float distance = Vector3.Distance(transform.position, outputObject.transform.position);
|
||||
@ -216,6 +216,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Moves items into a storage computer.
|
||||
private void OutputToStorageComputer()
|
||||
{
|
||||
outputID = outputObject.GetComponent<StorageComputer>().ID;
|
||||
@ -314,7 +315,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Makes input and output connections
|
||||
//! Makes input and output connections.
|
||||
private void ConnectToObject(GameObject obj)
|
||||
{
|
||||
if (obj.GetComponent<Auger>() != null)
|
||||
@ -673,6 +674,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Handles items received from input object.
|
||||
private void HandleInput()
|
||||
{
|
||||
if (inputObject.GetComponent<AlloySmelter>() != null)
|
||||
@ -849,6 +851,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//! Moves items received to the output object.
|
||||
private void HandleOutput()
|
||||
{
|
||||
connectionLine.SetPosition(0, transform.position);
|
||||
@ -1117,7 +1120,7 @@ public class UniversalConduit : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// Used to remove conduit item from storage computer if connected to one
|
||||
//! Used to remove conduit item from storage computer if connected to one.
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (storageComputerConduitItem != null)
|
||||
|
@ -29,7 +29,7 @@ public class UniversalExtractor : MonoBehaviour
|
||||
private GameObject builtObjects;
|
||||
public PowerReceiver powerReceiver;
|
||||
|
||||
// Called by unity engine on start up to initialize variables
|
||||
//! Called by unity engine on start up to initialize variables.
|
||||
public void Start()
|
||||
{
|
||||
powerReceiver = gameObject.AddComponent<PowerReceiver>();
|
||||
@ -42,7 +42,7 @@ public class UniversalExtractor : MonoBehaviour
|
||||
builtObjects = GameObject.Find("Built_Objects");
|
||||
}
|
||||
|
||||
// Used to remove the connection line renderer when the block is destroyed
|
||||
//! Used to remove the connection line renderer when the block is destroyed.
|
||||
public void OnDestroy()
|
||||
{
|
||||
if (inputLine != null)
|
||||
@ -51,13 +51,13 @@ public class UniversalExtractor : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
// The object exists, is active and is a resource node
|
||||
//! The object exists, is active and is a resource node.
|
||||
private bool IsValidResource(GameObject obj)
|
||||
{
|
||||
return obj != null && obj.transform.parent != builtObjects.transform && obj.activeInHierarchy && obj.GetComponent<UniversalResource>() != null;
|
||||
}
|
||||
|
||||
// Gets power values from power receiver
|
||||
//! Gets power values from power receiver.
|
||||
private void UpdatePowerReceiver()
|
||||
{
|
||||
powerReceiver.ID = ID;
|
||||
@ -66,7 +66,7 @@ public class UniversalExtractor : MonoBehaviour
|
||||
powerObject = powerReceiver.powerObject;
|
||||
}
|
||||
|
||||
// Called once per frame by unity engine
|
||||
//! Called once per frame by unity engine.
|
||||
public void Update()
|
||||
{
|
||||
updateTick += 1 * Time.deltaTime;
|
||||
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
//! This class is attached to all resource nodes.
|
||||
public class UniversalResource : MonoBehaviour
|
||||
{
|
||||
public string type;
|
||||
|
9
VP.cs
9
VP.cs
@ -1,11 +1,11 @@
|
||||
// Examples of VideoPlayer function
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
//! Video Player
|
||||
public class VP : MonoBehaviour
|
||||
{
|
||||
public GameObject cam;
|
||||
|
||||
//! Plays a video
|
||||
public void PlayVideo(string video,bool looping,float volume)
|
||||
{
|
||||
cam.GetComponent<UnityEngine.Video.VideoPlayer>().url = Application.dataPath + "/Video/" + video;
|
||||
@ -13,7 +13,8 @@ public class VP : MonoBehaviour
|
||||
cam.GetComponent<UnityEngine.Video.VideoPlayer>().SetDirectAudioVolume(0,volume);
|
||||
cam.GetComponent<UnityEngine.Video.VideoPlayer>().Play();
|
||||
}
|
||||
|
||||
|
||||
//! Stops a video
|
||||
public void StopVideo()
|
||||
{
|
||||
cam.GetComponent<UnityEngine.Video.VideoPlayer>().Stop();
|
||||
|
82
html/ActionManager_8cs.html
Normal file
82
html/ActionManager_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: ActionManager.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">ActionManager.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classActionManager.html">ActionManager</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/AddressManager_8cs.html
Normal file
82
html/AddressManager_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: AddressManager.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">AddressManager.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classAddressManager.html">AddressManager</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/AirLock_8cs.html
Normal file
82
html/AirLock_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: AirLock.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">AirLock.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classAirLock.html">AirLock</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/AlloySmelter_8cs.html
Normal file
82
html/AlloySmelter_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: AlloySmelter.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">AlloySmelter.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classAlloySmelter.html">AlloySmelter</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/AugerBlade_8cs.html
Normal file
82
html/AugerBlade_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: AugerBlade.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">AugerBlade.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classAugerBlade.html">AugerBlade</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/Auger_8cs.html
Normal file
82
html/Auger_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: Auger.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Auger.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classAuger.html">Auger</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/AutoCrafter_8cs.html
Normal file
82
html/AutoCrafter_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: AutoCrafter.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">AutoCrafter.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classAutoCrafter.html">AutoCrafter</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/BasicMachineRecipe_8cs.html
Normal file
82
html/BasicMachineRecipe_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: BasicMachineRecipe.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">BasicMachineRecipe.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classBasicMachineRecipe.html">BasicMachineRecipe</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/BasicMachine_8cs.html
Normal file
82
html/BasicMachine_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: BasicMachine.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">BasicMachine.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classBasicMachine.html">BasicMachine</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
83
html/BlockDictionary_8cs.html
Normal file
83
html/BlockDictionary_8cs.html
Normal file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: BlockDictionary.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">BlockDictionary.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlockDictionary.html">BlockDictionary</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class contains GameObject dictionaries for easily referencing different machines and other blocks. <a href="classBlockDictionary.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
83
html/BlockDummy_8cs.html
Normal file
83
html/BlockDummy_8cs.html
Normal file
@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: BlockDummy.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">BlockDummy.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlockDummy.html">BlockDummy</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class is attached to placeholder objects identified through Unity's GetComponent method. <a href="classBlockDummy.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
82
html/BlockInteraction_8cs.html
Normal file
82
html/BlockInteraction_8cs.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Quantum Engineering: BlockInteraction.cs File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Quantum Engineering
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#nested-classes">Classes</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">BlockInteraction.cs File Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlockInteraction.html">BlockInteraction</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user