Skip to content

Commit

Permalink
improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuvrot committed Nov 12, 2024
1 parent d7a49b7 commit 3ae91c8
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 14 deletions.
237 changes: 235 additions & 2 deletions Assets/Scenes/MainMenu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,104 @@ RectTransform:
m_AnchoredPosition: {x: -3.06, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &127075905
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 127075906}
- component: {fileID: 127075909}
- component: {fileID: 127075908}
- component: {fileID: 127075907}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &127075906
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 127075905}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1525686212}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.00010681152}
m_SizeDelta: {x: 0, y: 0.00033569}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &127075907
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 127075905}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 405d7f7281b0ec7408f975cdacc4c67a, type: 3}
m_Name:
m_EditorClassIdentifier:
text:
- "ATR\xC1S"
- BACK
--- !u!114 &127075908
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 127075905}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0.98031634, b: 0.7311321, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 2a7ec5614a7894f4580a211199858666, type: 3}
m_FontSize: 64
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 78
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: '++
'
--- !u!222 &127075909
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 127075905}
m_CullTransparentMesh: 1
--- !u!1 &194628136
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -4743,7 +4841,7 @@ MonoBehaviour:
screens:
- {fileID: 2090491307}
- {fileID: 465510086}
phoneMode: 1
_phoneMode: 0
playerMoney: 0
playerMoneyUI: {fileID: 224877960}
deletePlayerPrefs: 0
Expand Down Expand Up @@ -6331,6 +6429,140 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1525686211
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1525686212}
- component: {fileID: 1525686215}
- component: {fileID: 1525686214}
- component: {fileID: 1525686213}
m_Layer: 5
m_Name: cheat
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1525686212
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1525686211}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 127075906}
m_Father: {fileID: 2090491308}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 897.4009, y: -465}
m_SizeDelta: {x: 123.9604, y: 162.4061}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1525686213
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1525686211}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0, g: 0, b: 0, a: 0.3137255}
m_HighlightedColor: {r: 0, g: 0, b: 0, a: 0.627451}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1525686214}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1110828868}
m_TargetAssemblyTypeName: StoreManager, Assembly-CSharp
m_MethodName: MoneyCheat
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1525686214
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1525686211}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 2
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 0.09
--- !u!222 &1525686215
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1525686211}
m_CullTransparentMesh: 1
--- !u!1 &1570743170
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -8264,7 +8496,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
fullScreen: {fileID: 0}
screens: []
phoneMode: 0
_phoneMode: 0
playerMoney: 0
playerMoneyUI: {fileID: 0}
deletePlayerPrefs: 0
Expand Down Expand Up @@ -8366,6 +8598,7 @@ RectTransform:
m_Children:
- {fileID: 645568555}
- {fileID: 827174996}
- {fileID: 1525686212}
m_Father: {fileID: 1498507669}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down
3 changes: 2 additions & 1 deletion Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,7 @@ MonoBehaviour:
Clock: 0
pauseScreen: {fileID: 935035506}
pauseButton: {fileID: 1223928076}
phoneMode: 0
--- !u!4 &632780357
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3176,7 +3177,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 0
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3}
m_Name:
Expand Down
4 changes: 3 additions & 1 deletion Assets/Scripts/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class GameManager : MonoBehaviour
public GameObject pauseScreen;
public GameObject pauseButton;

public bool phoneMode = false;

// Start is called before the first frame update
void Awake()
{
Expand All @@ -51,7 +53,7 @@ void Awake()
table = Table.table;
fixedTable = Table.fixedTable;

if (MenuManager.phoneMode)
if (phoneMode)
{
pauseButton.SetActive(true);
}
Expand Down
5 changes: 5 additions & 0 deletions Assets/Scripts/MainMenu/StoreManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,9 @@ public void Select()
PlayerPrefs.SetInt("SelectedShip" , selectedShip);
ChangeShip();
}

public void MoneyCheat()
{
menuManager.playerMoney += 2000;
}
}
10 changes: 10 additions & 0 deletions Assets/Scripts/ShipController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;

public class ShipController : MonoBehaviour
{
Expand Down Expand Up @@ -42,6 +43,15 @@ void Start()

shipViewModels[shipIndex].SetActive(true);

if (QualitySettings.GetQualityLevel() == 5)
{
GetComponent<PostProcessVolume>().enabled = true;
}
else
{
GetComponent<PostProcessVolume>().enabled = false;
}

}

// Update is called once per frame
Expand Down
Loading

0 comments on commit 3ae91c8

Please sign in to comment.