Skip to content

Commit

Permalink
General Update JACK 12.FEB.2072
Browse files Browse the repository at this point in the history
Added more config functionality.  Fixed some bugs.  Tested build and
fixed build bugs.
  • Loading branch information
JosiahJack committed Feb 12, 2017
1 parent 8a9b035 commit 5f79841
Show file tree
Hide file tree
Showing 18 changed files with 212 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Tt]estBuilds/

# Autogenerated VS/MD solution and project files
*.csproj
Expand Down
Binary file modified Assets/Scenes/CitadelScene.unity
Binary file not shown.
Binary file added Assets/Scenes/MasterSceneOld.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Scenes/MasterSceneOld.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Assets/Scripts/ConfigurationMenuVideoApply.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ public class ConfigurationMenuVideoApply : MonoBehaviour {

public void OnApplyClick () {
Screen.SetResolution(Screen.resolutions[resolutionPicker.value].width,Screen.resolutions[resolutionPicker.value].height,true);
Screen.fullScreen = Const.a.GraphicsFullscreen;
Const.a.GraphicsResWidth = Screen.resolutions[resolutionPicker.value].width;
Const.a.GraphicsResHeight = Screen.resolutions[resolutionPicker.value].height;
Const.a.WriteConfig();
}
}
5 changes: 5 additions & 0 deletions Assets/Scripts/Const.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ public enum PoolType{DartImpacts,SparqImpacts,CameraExplosions,ProjEnemShot2,Sec
void Awake() {
Application.targetFrameRate = 60;
a = this;
//for (int i=0;i<Display.displays.Length;i++) {
// Display.displays[i].Activate();
//}
}
// =========================================================================
void Start() {
Expand Down Expand Up @@ -131,6 +134,8 @@ private void LoadConfig() {
InputQuickItemPickup = AssignConfigBool("Input","QuickItemPickup");
InputQuickReloadWeapons = AssignConfigBool("Input","QuickReloadWeapons");
SetVolume();
Screen.SetResolution(GraphicsResWidth,GraphicsResHeight,true);
Screen.fullScreen = Const.a.GraphicsFullscreen;
}

public void WriteConfig() {
Expand Down
8 changes: 5 additions & 3 deletions Assets/Scripts/MouseCursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ void OnGUI () {
offsetY = offsetX;
}

//Debug.Log("MouseCursor:: Input.mousePosition.x: " + Input.mousePosition.x.ToString() + ", Input.mousePosition.y: " + Input.mousePosition.y.ToString());
if (playerCamera.GetComponent<MouseLookScript>().inventoryMode) {
/*//Debug.Log("MouseCursor:: Input.mousePosition.x: " + Input.mousePosition.x.ToString() + ", Input.mousePosition.y: " + Input.mousePosition.y.ToString());
if (playerCamera.GetComponent<MouseLookScript>().inventoryMode || PauseScript.a.paused) {
// Inventory Mode Cursor
GUI.DrawTexture(new Rect(Input.mousePosition.x - offsetX, Screen.height - Input.mousePosition.y - offsetY, cursorSize, cursorSize), cursorImage);
} else {
// Shoot Mode Cursor
GUI.DrawTexture(new Rect((Screen.width/2) - offsetX, (Screen.height/2) - cursorSize, cursorSize, cursorSize), cursorImage);
}
}*/

GUI.DrawTexture(new Rect(Input.mousePosition.x - offsetX, Screen.height - Input.mousePosition.y - offsetY, cursorSize, cursorSize), cursorImage);
}

void Update () {
Expand Down
4 changes: 3 additions & 1 deletion Assets/Scripts/MouseLookScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ void Update () {
xRotation -= (Input.GetAxis("Mouse Y") * lookSensitivity);
xRotation = Mathf.Clamp(xRotation, -90, 90); // Limit up and down angle. TIP:: Need to disable clamp for Cyberspace!
transform.rotation = Quaternion.Euler(xRotation, yRotation, 0);
} else {
Const.sprint("ERROR: Paused is true and inventoryMode is false");
}
} else {
if (Input.GetButton("Yaw")) {
Expand Down Expand Up @@ -741,7 +743,7 @@ void SearchObject ( int index ){
int[] resultContents = {-1,-1,-1,-1}; // create blanked container for search results
int[] resultCustomIndex = {-1,-1,-1,-1}; // create blanked container for search results custom indices
for (int i=currentSearchItem.GetComponent<SearchableItem>().numSlots - 1;i>=0;i--) {
Const.sprint("Search index = " + i.ToString() + ", and SearchableItem.customIndex.Length = " + currentSearchItem.GetComponent<SearchableItem>().customIndex.Length.ToString());
//Const.sprint("Search index = " + i.ToString() + ", and SearchableItem.customIndex.Length = " + currentSearchItem.GetComponent<SearchableItem>().customIndex.Length.ToString());
resultContents[i] = currentSearchItem.GetComponent<SearchableItem>().contents[i];
resultCustomIndex[i] = currentSearchItem.GetComponent<SearchableItem>().customIndex[i];
if (resultContents[i] > -1) {
Expand Down
21 changes: 11 additions & 10 deletions Assets/Scripts/PauseScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class PauseScript : MonoBehaviour {
private Texture2D previousCursorImage;
public GameObject saltTheFries;
public GameObject[] enableUIOnPause;
public GameObject quitButton;
public GameObject mainMenu;

void Awake() {a = this; }
Expand Down Expand Up @@ -42,35 +41,37 @@ public void PauseToggle() {
}

void PauseEnable() {
previousInvMode = mouselookScript.inventoryMode;
if (mouselookScript.inventoryMode == false) {
mouselookScript.ToggleInventoryMode();
}
paused = true;
pauseText.enabled = true;
previousInvMode = mouselookScript.inventoryMode;
previousCursorImage = mouseCursor.cursorImage;
mouseCursor.cursorImage = mouselookScript.cursorDefaultTexture;
mouselookScript.inventoryMode = true;
for (int i=0;i>disableUIOnPause.Length;i++) {
for (int i=0;i<disableUIOnPause.Length;i++) {
disableUIOnPause[i].SetActive(false);
}

for (int j=0;j>enableUIOnPause.Length;j++) {
for (int j=0;j<enableUIOnPause.Length;j++) {
enableUIOnPause[j].SetActive(true);
}
quitButton.SetActive(true);
}

void PauseDisable() {
paused = false;
pauseText.enabled = false;
mouselookScript.inventoryMode = previousInvMode;
if (previousInvMode != mouselookScript.inventoryMode) {
mouselookScript.ToggleInventoryMode();
}
mouseCursor.cursorImage = previousCursorImage;
for (int i=0;i>disableUIOnPause.Length;i++) {
for (int i=0;i<disableUIOnPause.Length;i++) {
disableUIOnPause[i].SetActive(true);
}

for (int j=0;j>enableUIOnPause.Length;j++) {
for (int j=0;j<enableUIOnPause.Length;j++) {
enableUIOnPause[j].SetActive(false);
}
quitButton.SetActive(false);
}

public void PauseQuit () {
Expand Down
4 changes: 2 additions & 2 deletions Assets/StreamingAssets/Config.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Citadel Configuration File
[Graphics]
ResolutionWidth = 1024
ResolutionHeight = 768
ResolutionWidth = 1680
ResolutionHeight = 1050
Fullscreen = 1
SSAO = 1
Bloom = 1
Expand Down
Binary file added Assets/UI/fontsrc/amiga4ever pro2.ttf
Binary file not shown.
21 changes: 21 additions & 0 deletions Assets/UI/fontsrc/amiga4ever pro2.ttf.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/UI/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions Assets/UI/splash.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/UI/splash_sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions Assets/UI/splash_sprite.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified ProjectSettings/ProjectSettings.asset
Binary file not shown.
Binary file modified ProjectSettings/QualitySettings.asset
Binary file not shown.

0 comments on commit 5f79841

Please sign in to comment.