Skip to content

Commit

Permalink
Hotfix: CYF Unity not working properly when playing the project in Li…
Browse files Browse the repository at this point in the history
…nux and Mac
  • Loading branch information
RhenaudTheLukark committed Apr 18, 2019
1 parent d5fdcb7 commit 76a3fe2
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Assets/Scripts/Battle/FightUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void Update() {
Vector2 localEnePos = enemy.GetComponent<RectTransform>().anchoredPosition; // get local position to do the shake
enemy.GetComponent<RectTransform>().anchoredPosition = new Vector2(localEnePos.x + shakeX[shakeIndex], localEnePos.y);

/*#if UNITY_STANDALONE_WIN || UNITY_EDITOR
/*#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (StaticInits.ENCOUNTER == "01 - Two monsters" && StaticInits.MODFOLDER == "Examples")
Misc.MoveWindow(shakeX[shakeIndex] * 2, 0);
#endif*/
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Battle/UIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public static void EndBattle(bool fromGameOver = false) {
Inventory.RemoveAddedItems();
GlobalControls.lastTitle = false;
PlayerCharacter.instance.MaxHPShift = 0;
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (GlobalControls.crate) Misc.WindowName = ControlPanel.instance.WinodwBsaisNmae;
else Misc.WindowName = ControlPanel.instance.WindowBasisName;
#endif
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/Device/DisclaimerScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private void Start() {
SaveLoad.Start();
new ControlPanel();
new PlayerCharacter();
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (GlobalControls.crate) Misc.WindowName = ControlPanel.instance.WinodwBsaisNmae;
else Misc.WindowName = ControlPanel.instance.WindowBasisName;
#endif
Expand Down Expand Up @@ -57,7 +57,7 @@ private void Start() {
/// </summary>
private void Update() {
// try to hook on to the game window when the user interacts
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.O)
|| (Input.GetKeyDown(KeyCode.F4) // F4
|| (Input.GetKeyDown(KeyCode.Return)
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Device/Misc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static void ResetCamera() {

public static void DestroyWindow() { Application.Quit(); }

#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
[DllImport("user32.dll")]
private static extern int GetActiveWindow();
public static int window = GetActiveWindow();
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Lua/LuaScriptBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static Script BoundScript(/*bool overworld = false*/) {

script.Globals["isCYF"] = true;
script.Globals["safe"] = ControlPanel.instance.Safe;
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
script.Globals["windows"] = true;
#else
script.Globals["windows"] = false;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Overworld/IntroManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void Start () {
SaveLoad.Start();
new ControlPanel();
new PlayerCharacter();
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (GlobalControls.crate) Misc.WindowName = ControlPanel.instance.WinodwBsaisNmae;
else Misc.WindowName = ControlPanel.instance.WindowBasisName;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Overworld/SpecialAnnouncementScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void Start () {
SaveLoad.Start();
new ControlPanel();
new PlayerCharacter();
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (GlobalControls.crate) Misc.WindowName = ControlPanel.instance.WinodwBsaisNmae;
else Misc.WindowName = ControlPanel.instance.WindowBasisName;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Overworld/Title.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void Start () {
SaveLoad.Start();
new ControlPanel();
new PlayerCharacter();
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
if (GlobalControls.crate) Misc.WindowName = ControlPanel.instance.WinodwBsaisNmae;
else Misc.WindowName = ControlPanel.instance.WindowBasisName;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Util/ControlPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ [System.Serializable]public class ControlPanel {
public string WinodwBsaisNmae = "Crate Your Frisk";
public bool FrameBasedMovement = false;
public bool Safe = false;
#if UNITY_STANDALONE_WIN || UNITY_EDITOR
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
public bool windows = true;
#else
public bool windows = false;
Expand Down

0 comments on commit 76a3fe2

Please sign in to comment.