Ranked done, Shop done and many fixes
This commit is contained in:
parent
4194d2decc
commit
f4e5b60bbf
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 0}
|
m_Sun: {fileID: 0}
|
||||||
m_IndirectSpecularColor: {r: 0.44402248, g: 0.49316555, b: 0.5722324, a: 1}
|
m_IndirectSpecularColor: {r: 0.4465791, g: 0.4964133, b: 0.57481784, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
|
@ -123,49 +123,6 @@ NavMeshSettings:
|
||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
--- !u!1 &5820110
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 5820111}
|
|
||||||
- component: {fileID: 5820112}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: SpawnPoint (10)
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &5820111
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5820110}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: -202, y: -89, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 945516891}
|
|
||||||
m_RootOrder: 9
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &5820112
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 5820110}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 41f84591ce72545258ea98cb7518d8b9, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!1 &7902094
|
--- !u!1 &7902094
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -5211,7 +5168,7 @@ MonoBehaviour:
|
||||||
authenticator: {fileID: 0}
|
authenticator: {fileID: 0}
|
||||||
playerPrefab: {fileID: 5431987895376475548, guid: e811a838f2ebb2f4fb8055331ed295e9, type: 3}
|
playerPrefab: {fileID: 5431987895376475548, guid: e811a838f2ebb2f4fb8055331ed295e9, type: 3}
|
||||||
autoCreatePlayer: 1
|
autoCreatePlayer: 1
|
||||||
playerSpawnMethod: 0
|
playerSpawnMethod: 1
|
||||||
spawnPrefabs:
|
spawnPrefabs:
|
||||||
- {fileID: 5339383961425506408, guid: ad54ea1b437d2b344add56c18d1efb3e, type: 3}
|
- {fileID: 5339383961425506408, guid: ad54ea1b437d2b344add56c18d1efb3e, type: 3}
|
||||||
- {fileID: 8298505072154104440, guid: 8cfd89c315493e64782e167885b4b498, type: 3}
|
- {fileID: 8298505072154104440, guid: 8cfd89c315493e64782e167885b4b498, type: 3}
|
||||||
|
|
@ -5256,6 +5213,8 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
isClient: 1
|
isClient: 1
|
||||||
|
isRanked: 0
|
||||||
|
transport: {fileID: 0}
|
||||||
--- !u!1 &43679075
|
--- !u!1 &43679075
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -5959,6 +5918,7 @@ MonoBehaviour:
|
||||||
metalEarnings: {fileID: 5001849304093201857}
|
metalEarnings: {fileID: 5001849304093201857}
|
||||||
survivalTimeTxt: {fileID: 139961636}
|
survivalTimeTxt: {fileID: 139961636}
|
||||||
mostTimeTxt: {fileID: 2120458708}
|
mostTimeTxt: {fileID: 2120458708}
|
||||||
|
gameOverTxt: {fileID: 0}
|
||||||
boostBtn: {fileID: 2133876932}
|
boostBtn: {fileID: 2133876932}
|
||||||
timerTxt: {fileID: 297250423}
|
timerTxt: {fileID: 297250423}
|
||||||
--- !u!4 &332697609
|
--- !u!4 &332697609
|
||||||
|
|
@ -5989,9 +5949,14 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
syncMode: 0
|
syncMode: 0
|
||||||
syncInterval: 0.1
|
syncInterval: 0.1
|
||||||
mapRadius: 500
|
isRanked: 0
|
||||||
maxMoons: 700
|
RankedGameStarted: 0
|
||||||
maxStars: 1000
|
winnerId: -1
|
||||||
|
waitingScreen: {fileID: 0}
|
||||||
|
rankedSummary: {fileID: 0}
|
||||||
|
mapRadius: 250
|
||||||
|
maxMoons: 350
|
||||||
|
maxStars: 500
|
||||||
pickupItemsParent: {fileID: 41572335}
|
pickupItemsParent: {fileID: 41572335}
|
||||||
moon: {fileID: 5339383961425506408, guid: ad54ea1b437d2b344add56c18d1efb3e, type: 3}
|
moon: {fileID: 5339383961425506408, guid: ad54ea1b437d2b344add56c18d1efb3e, type: 3}
|
||||||
star: {fileID: 8298505072154104440, guid: 8cfd89c315493e64782e167885b4b498, type: 3}
|
star: {fileID: 8298505072154104440, guid: 8cfd89c315493e64782e167885b4b498, type: 3}
|
||||||
|
|
@ -6579,7 +6544,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 494509960}
|
m_GameObject: {fileID: 494509960}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -678, y: -58, z: 0}
|
m_LocalPosition: {x: -439, y: -244, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 945516891}
|
m_Father: {fileID: 945516891}
|
||||||
|
|
@ -6969,7 +6934,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 613727044}
|
m_GameObject: {fileID: 613727044}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -571, y: -748, z: 0}
|
m_LocalPosition: {x: -308, y: -341, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 945516891}
|
m_Father: {fileID: 945516891}
|
||||||
|
|
@ -7229,7 +7194,7 @@ Transform:
|
||||||
m_GameObject: {fileID: 725845372}
|
m_GameObject: {fileID: 725845372}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 32.2, y: 32.2, z: 1}
|
m_LocalScale: {x: 16.1, y: 16.1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 10
|
m_RootOrder: 10
|
||||||
|
|
@ -8011,7 +7976,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 871230063}
|
m_GameObject: {fileID: 871230063}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -264, y: -527, z: 0}
|
m_LocalPosition: {x: -356, y: -562, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 945516891}
|
m_Father: {fileID: 945516891}
|
||||||
|
|
@ -8239,7 +8204,6 @@ Transform:
|
||||||
- {fileID: 1837953384}
|
- {fileID: 1837953384}
|
||||||
- {fileID: 494509961}
|
- {fileID: 494509961}
|
||||||
- {fileID: 1398901127}
|
- {fileID: 1398901127}
|
||||||
- {fileID: 5820111}
|
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 8
|
m_RootOrder: 8
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|
@ -8588,6 +8552,7 @@ MonoBehaviour:
|
||||||
- {fileID: 37150598}
|
- {fileID: 37150598}
|
||||||
- {fileID: 2145051021}
|
- {fileID: 2145051021}
|
||||||
updateInterval: 0.5
|
updateInterval: 0.5
|
||||||
|
isRanked: 0
|
||||||
--- !u!1 &1118240007
|
--- !u!1 &1118240007
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -9280,7 +9245,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1398901126}
|
m_GameObject: {fileID: 1398901126}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -642, y: -349, z: 0}
|
m_LocalPosition: {x: -328, y: -556, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 945516891}
|
m_Father: {fileID: 945516891}
|
||||||
|
|
@ -9398,7 +9363,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1474265870}
|
m_GameObject: {fileID: 1474265870}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -270, y: -746, z: 0}
|
m_LocalPosition: {x: -250, y: -411, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 945516891}
|
m_Father: {fileID: 945516891}
|
||||||
|
|
@ -9915,7 +9880,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1837953383}
|
m_GameObject: {fileID: 1837953383}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -356, y: -510, z: 0}
|
m_LocalPosition: {x: -382, y: -597, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 945516891}
|
m_Father: {fileID: 945516891}
|
||||||
|
|
@ -9958,7 +9923,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1853399998}
|
m_GameObject: {fileID: 1853399998}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -472, y: -531, z: 0}
|
m_LocalPosition: {x: -572, y: -423, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 945516891}
|
m_Father: {fileID: 945516891}
|
||||||
|
|
@ -10440,7 +10405,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &2133876931
|
--- !u!224 &2133876931
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
BIN
Assets/Game/Scenes/Minigame/ship_skins.zip
Normal file
BIN
Assets/Game/Scenes/Minigame/ship_skins.zip
Normal file
Binary file not shown.
7
Assets/Game/Scenes/Minigame/ship_skins.zip.meta
Normal file
7
Assets/Game/Scenes/Minigame/ship_skins.zip.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9874c3508c7e3534ab371989fd8cf992
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -11,6 +11,7 @@ public class ChestOpener : MonoBehaviour
|
||||||
|
|
||||||
|
|
||||||
public GameObject chestOpenPopup;
|
public GameObject chestOpenPopup;
|
||||||
|
public bool active => chestOpenPopup.activeSelf;
|
||||||
public Animator chestAnim;
|
public Animator chestAnim;
|
||||||
public GameObject gemsDrop;
|
public GameObject gemsDrop;
|
||||||
public GameObject goldDrop;
|
public GameObject goldDrop;
|
||||||
|
|
@ -24,10 +25,10 @@ public class ChestOpener : MonoBehaviour
|
||||||
instance = this;
|
instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void OpenChest(){
|
public async void OpenChest(int minLuck, int maxLuck){
|
||||||
chestOpenPopup.SetActive(true);
|
chestOpenPopup.SetActive(true);
|
||||||
okButton.SetActive(false);
|
okButton.SetActive(false);
|
||||||
int luckiness= Random.Range(0,100);
|
int luckiness= Random.Range(minLuck,maxLuck);
|
||||||
List<SkinShopItemData> baseSkins = new List<SkinShopItemData>();
|
List<SkinShopItemData> baseSkins = new List<SkinShopItemData>();
|
||||||
List<SkinShopItemData> rareSkins = new List<SkinShopItemData>();
|
List<SkinShopItemData> rareSkins = new List<SkinShopItemData>();
|
||||||
List<SkinShopItemData> legendarySkins = new List<SkinShopItemData>();
|
List<SkinShopItemData> legendarySkins = new List<SkinShopItemData>();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
public class DBmanager : MonoBehaviour
|
public class DBmanager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static string phpRoot = "http://vps.playpoolstudios.com/upf/";
|
public static string phpRoot = "http://vmi1005083.contaboserver.net/upf/";
|
||||||
|
|
||||||
public static string username = null;
|
public static string username = null;
|
||||||
|
|
||||||
|
|
@ -22,6 +22,7 @@ public class DBmanager : MonoBehaviour
|
||||||
private static int trophies = 0;
|
private static int trophies = 0;
|
||||||
private static int mostTime=0;
|
private static int mostTime=0;
|
||||||
private static int doubleKills,tripleKills,quadKills,pentaKills = 0;
|
private static int doubleKills,tripleKills,quadKills,pentaKills = 0;
|
||||||
|
private static DateTime lastCollectedDailyChest;
|
||||||
|
|
||||||
private static List<InventoryEntry> inventory;
|
private static List<InventoryEntry> inventory;
|
||||||
private static List<int> expPassCollected = new List<int>();
|
private static List<int> expPassCollected = new List<int>();
|
||||||
|
|
@ -39,6 +40,7 @@ public class DBmanager : MonoBehaviour
|
||||||
public static int TripleKills => tripleKills;
|
public static int TripleKills => tripleKills;
|
||||||
public static int QuadKills => quadKills;
|
public static int QuadKills => quadKills;
|
||||||
public static int PentaKills => pentaKills;
|
public static int PentaKills => pentaKills;
|
||||||
|
public static DateTime LastCollectedDailyChest => lastCollectedDailyChest;
|
||||||
public static float Level => level;
|
public static float Level => level;
|
||||||
public static int LevelInt => Mathf.CeilToInt(level);
|
public static int LevelInt => Mathf.CeilToInt(level);
|
||||||
public static List<int> ExpPassCollected => expPassCollected;
|
public static List<int> ExpPassCollected => expPassCollected;
|
||||||
|
|
@ -218,7 +220,9 @@ public class DBmanager : MonoBehaviour
|
||||||
WWWForm form = new WWWForm();
|
WWWForm form = new WWWForm();
|
||||||
form.AddField("name", username);
|
form.AddField("name", username);
|
||||||
form.AddField("gems", newValue);
|
form.AddField("gems", newValue);
|
||||||
if (justOffline) { gems = newValue; return; }
|
int oldVal = Gems;
|
||||||
|
gems = newValue;
|
||||||
|
if (justOffline) {return; }
|
||||||
using (UnityWebRequest www = UnityWebRequest.Post(phpRoot + "set_gems.php", form))
|
using (UnityWebRequest www = UnityWebRequest.Post(phpRoot + "set_gems.php", form))
|
||||||
{
|
{
|
||||||
var operation = www.SendWebRequest();
|
var operation = www.SendWebRequest();
|
||||||
|
|
@ -235,6 +239,7 @@ public class DBmanager : MonoBehaviour
|
||||||
{
|
{
|
||||||
Debug.Log("Response : " + www.downloadHandler.text);
|
Debug.Log("Response : " + www.downloadHandler.text);
|
||||||
Debug.LogWarning("Failed to set gems to " + newValue);
|
Debug.LogWarning("Failed to set gems to " + newValue);
|
||||||
|
gems = oldVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -247,7 +252,9 @@ public class DBmanager : MonoBehaviour
|
||||||
WWWForm form = new WWWForm();
|
WWWForm form = new WWWForm();
|
||||||
form.AddField("name", username);
|
form.AddField("name", username);
|
||||||
form.AddField("metal", newValue);
|
form.AddField("metal", newValue);
|
||||||
if (justOffline) { metal = newValue; return; }
|
int oldVal = metal;
|
||||||
|
metal = newValue;
|
||||||
|
if (justOffline) { return; }
|
||||||
using (UnityWebRequest www = UnityWebRequest.Post(phpRoot + "set_metal.php", form))
|
using (UnityWebRequest www = UnityWebRequest.Post(phpRoot + "set_metal.php", form))
|
||||||
{
|
{
|
||||||
var operation = www.SendWebRequest();
|
var operation = www.SendWebRequest();
|
||||||
|
|
@ -265,6 +272,7 @@ public class DBmanager : MonoBehaviour
|
||||||
{
|
{
|
||||||
Debug.Log("Response : " + www.downloadHandler.text);
|
Debug.Log("Response : " + www.downloadHandler.text);
|
||||||
Debug.LogWarning("Failed to set metal to " + newValue);
|
Debug.LogWarning("Failed to set metal to " + newValue);
|
||||||
|
metal = oldVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -461,6 +469,40 @@ public class DBmanager : MonoBehaviour
|
||||||
OnStateChanged.Invoke();
|
OnStateChanged.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async static void SetLastCollectedDailyChest(string newValue, bool justOffline = false)
|
||||||
|
{
|
||||||
|
WWWForm form = new WWWForm();
|
||||||
|
form.AddField("name", username);
|
||||||
|
form.AddField("value", newValue);
|
||||||
|
DateTime oldValue = lastCollectedDailyChest;
|
||||||
|
lastCollectedDailyChest = DateTime.Parse(newValue);
|
||||||
|
Debug.Log(newValue + ":"+lastCollectedDailyChest);
|
||||||
|
if (justOffline) { return; }
|
||||||
|
using (UnityWebRequest www = UnityWebRequest.Post(phpRoot + "set_daily_chest_collected.php", form))
|
||||||
|
{
|
||||||
|
var operation = www.SendWebRequest();
|
||||||
|
while (!operation.isDone)
|
||||||
|
{
|
||||||
|
await Task.Yield();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (www.downloadHandler.text == "0")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lastCollectedDailyChest = oldValue;
|
||||||
|
Debug.Log("Response : " + www.downloadHandler.text);
|
||||||
|
Debug.LogWarning("Failed to set lastCollectedDailyChest to " + newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GameManager.Refresh();
|
||||||
|
OnStateChanged.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void SetExpPassCollected(string rawData, bool justOffline = false)
|
public static void SetExpPassCollected(string rawData, bool justOffline = false)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
|
|
@ -132,5 +132,33 @@ public class GameManager : MonoBehaviour
|
||||||
public void LoadRanked(){
|
public void LoadRanked(){
|
||||||
LoadingScreen.instance.LoadLevel("MinigameMatchmaking");
|
LoadingScreen.instance.LoadLevel("MinigameMatchmaking");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Signout(){
|
||||||
|
PlayerPrefs.DeleteAll();
|
||||||
|
PlayerPrefs.Save();
|
||||||
|
|
||||||
|
LoadingScreen.instance.LoadLevel("Login");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BuyChest(ChestButton button){
|
||||||
|
if(DBmanager.Gems < button.Price){
|
||||||
|
MessageDialog.instance.ShowDialog("Failed", "Insufficient Gems to complete the purchase");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DBmanager.SetGems(DBmanager.Gems-button.Price);
|
||||||
|
ChestOpener.instance.OpenChest((int)button.minLuck, (int)button.maxLuck);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BuyGold(GoldPackButton button){
|
||||||
|
if(DBmanager.Gems < button.Price){
|
||||||
|
MessageDialog.instance.ShowDialog("Failed", "Insufficient Gems to complete the purchase");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DBmanager.SetGems(DBmanager.Gems-button.Price);
|
||||||
|
DBmanager.SetCoins(DBmanager.Coins + button.Amount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ public class LoadingScreen : MonoBehaviour
|
||||||
CanvasGroup canvasGroup;
|
CanvasGroup canvasGroup;
|
||||||
public Slider loadingProgress;
|
public Slider loadingProgress;
|
||||||
public TMPro.TMP_Text loadingProgressTxt;
|
public TMPro.TMP_Text loadingProgressTxt;
|
||||||
|
private static bool loading;
|
||||||
|
public static bool Loading => loading;
|
||||||
|
|
||||||
void Awake(){
|
void Awake(){
|
||||||
instance =this;
|
instance =this;
|
||||||
|
|
@ -20,10 +22,12 @@ public class LoadingScreen : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadLevel(string levelName){
|
public void LoadLevel(string levelName){
|
||||||
|
if(loading){return;}loading=true;
|
||||||
StartCoroutine(loadlLevel(levelName));
|
StartCoroutine(loadlLevel(levelName));
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator loadlLevel(string levelName){
|
IEnumerator loadlLevel(string levelName){
|
||||||
|
loading=true;
|
||||||
canvasGroup.alpha=0;
|
canvasGroup.alpha=0;
|
||||||
canvasGroup.blocksRaycasts=true;
|
canvasGroup.blocksRaycasts=true;
|
||||||
SetProgress(0);
|
SetProgress(0);
|
||||||
|
|
@ -53,6 +57,7 @@ public class LoadingScreen : MonoBehaviour
|
||||||
canvasGroup.alpha-=0.03f;
|
canvasGroup.alpha-=0.03f;
|
||||||
yield return new WaitForFixedUpdate();
|
yield return new WaitForFixedUpdate();
|
||||||
}
|
}
|
||||||
|
loading=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetProgress(float value){
|
void SetProgress(float value){
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ public class LoginManager : MonoBehaviour
|
||||||
PlayerPrefs.Save();}
|
PlayerPrefs.Save();}
|
||||||
DBmanager.username = login_username.text;
|
DBmanager.username = login_username.text;
|
||||||
|
|
||||||
|
DBmanager.SetLastCollectedDailyChest(www.text.Split('\t')[15],true);
|
||||||
DBmanager.SetPentaKills(int.Parse(www.text.Split('\t')[14]),true);
|
DBmanager.SetPentaKills(int.Parse(www.text.Split('\t')[14]),true);
|
||||||
DBmanager.SetQuadKills(int.Parse(www.text.Split('\t')[13]),true);
|
DBmanager.SetQuadKills(int.Parse(www.text.Split('\t')[13]),true);
|
||||||
DBmanager.SetTripleKills(int.Parse(www.text.Split('\t')[12]),true);
|
DBmanager.SetTripleKills(int.Parse(www.text.Split('\t')[12]),true);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
|
@ -20,6 +21,7 @@ public class MessageDialog : MonoBehaviour
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
actionBtn.onClick.AddListener(OnAction);
|
actionBtn.onClick.AddListener(OnAction);
|
||||||
SetActive(false);
|
SetActive(false);
|
||||||
|
DontDestroyOnLoad(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnAction(){
|
void OnAction(){
|
||||||
|
|
@ -28,11 +30,19 @@ public class MessageDialog : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowDialog(string title, string message){
|
public async void ShowDialog(string title, string message){
|
||||||
titleTxt.text = title;
|
titleTxt.text = title;
|
||||||
messageTxt.text = message;
|
messageTxt.text = message;
|
||||||
|
|
||||||
|
|
||||||
SetActive(true);
|
SetActive(true);
|
||||||
|
Canvas.ForceUpdateCanvases();
|
||||||
|
GetComponentInChildren<VerticalLayoutGroup>().enabled=false;
|
||||||
|
GetComponentInChildren<VerticalLayoutGroup>().enabled=true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// messageTxt.gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetActive(bool value){
|
public void SetActive(bool value){
|
||||||
|
|
|
||||||
|
|
@ -6,56 +6,120 @@ using LightReflectiveMirror;
|
||||||
public class AutoConnect : MonoBehaviour
|
public class AutoConnect : MonoBehaviour
|
||||||
{
|
{
|
||||||
public bool isClient;
|
public bool isClient;
|
||||||
public static bool isRankedServer;
|
public static int serverPort;
|
||||||
public static string serverName;
|
|
||||||
public bool isRanked;
|
public bool isRanked;
|
||||||
public LightReflectiveMirrorTransport lrm;
|
public kcp2k.KcpTransport transport;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
if(isRanked){
|
if (isRanked)
|
||||||
|
{
|
||||||
|
|
||||||
|
// if(!isRankedServer){
|
||||||
|
// lrm.serverListUpdated.AddListener(OnServerListUpdated);
|
||||||
|
// StartCoroutine(refreshList());
|
||||||
|
// }else{
|
||||||
|
// StartCoroutine(startHost());
|
||||||
|
|
||||||
|
// }
|
||||||
|
string[] args = System.Environment.GetCommandLineArgs();
|
||||||
|
string input = "";
|
||||||
|
for (int i = 0; i < args.Length; i++)
|
||||||
|
{
|
||||||
|
// Debug.Log("ARG " + i + ": " + args[i]);
|
||||||
|
if (args[i] == "-port")
|
||||||
|
{
|
||||||
|
input = args[i + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ushort port = 7777;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
port = ushort.Parse(input);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
if(!isRankedServer){
|
|
||||||
lrm.serverListUpdated.AddListener(OnServerListUpdated);
|
|
||||||
StartCoroutine(refreshList());
|
|
||||||
}else{
|
|
||||||
StartCoroutine(startHost());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(!isClient){
|
||||||
|
Debug.Log("Setting port to " + port);
|
||||||
|
transport.Port = port;
|
||||||
|
NetworkManager.singleton.StartServer();
|
||||||
}else{
|
}else{
|
||||||
if(isClient){
|
NetworkManager.singleton.networkAddress = RegionManager.selectedServer.ip;
|
||||||
|
transport.Port = (ushort)serverPort;
|
||||||
|
NetworkManager.singleton.StartClient();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (isClient)
|
||||||
|
{
|
||||||
FindObjectOfType<NetworkManager>().networkAddress = RegionManager.selectedServer.ip;
|
FindObjectOfType<NetworkManager>().networkAddress = RegionManager.selectedServer.ip;
|
||||||
FindObjectOfType<NetworkManager>().StartClient();
|
FindObjectOfType<NetworkManager>().StartClient();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
float t;
|
||||||
IEnumerator startHost(){
|
void Update(){
|
||||||
while(!lrm.isConnectedToRelay){
|
if(isRanked && !isClient){
|
||||||
yield return new WaitForSeconds(1);
|
//timer
|
||||||
|
t += Time.deltaTime;
|
||||||
|
if(t > 30 && FindObjectsOfType<SpaceshipController>().Length ==0){
|
||||||
|
//No players joined, or they left, gotta close my self
|
||||||
|
t=0;
|
||||||
|
StartCoroutine(CloseRoom());
|
||||||
}
|
}
|
||||||
lrm.serverName = serverName;
|
|
||||||
lrm.isPublicServer=true;
|
|
||||||
NetworkManager.singleton.StartHost();
|
|
||||||
}
|
|
||||||
IEnumerator refreshList(){
|
|
||||||
while(!lrm.isConnectedToRelay){
|
|
||||||
yield return new WaitForSeconds(1);
|
|
||||||
}
|
|
||||||
while(!NetworkManager.singleton.isNetworkActive){
|
|
||||||
yield return new WaitForSeconds(1);
|
|
||||||
lrm.RequestServerList();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnServerListUpdated(){
|
IEnumerator CloseRoom(){
|
||||||
Debug.Log("Got new server list of " + lrm.relayServerList.Count);
|
WWWForm form = new WWWForm();
|
||||||
foreach(Room room in lrm.relayServerList){
|
form.AddField("port", serverPort);
|
||||||
if(room.serverName == serverName){
|
WWW req = new WWW(DBmanager.phpRoot+"clear_ranked_room.php",form);
|
||||||
Debug.Log("Found server for me! Joining now");
|
yield return req;
|
||||||
NetworkManager.singleton.networkAddress = room.serverId;
|
|
||||||
NetworkManager.singleton.StartClient();
|
Application.Quit();
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IEnumerator startHost()
|
||||||
|
// {
|
||||||
|
// while (!lrm.isConnectedToRelay)
|
||||||
|
// {
|
||||||
|
// yield return new WaitForSeconds(1);
|
||||||
|
// }
|
||||||
|
// lrm.serverName = serverName;
|
||||||
|
// lrm.isPublicServer = true;
|
||||||
|
// NetworkManager.singleton.StartHost();
|
||||||
|
// }
|
||||||
|
// IEnumerator refreshList()
|
||||||
|
// {
|
||||||
|
// while (!lrm.isConnectedToRelay)
|
||||||
|
// {
|
||||||
|
// yield return new WaitForSeconds(1);
|
||||||
|
// }
|
||||||
|
// while (!NetworkManager.singleton.isNetworkActive)
|
||||||
|
// {
|
||||||
|
// yield return new WaitForSeconds(1);
|
||||||
|
// lrm.RequestServerList();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// void OnServerListUpdated()
|
||||||
|
// {
|
||||||
|
// Debug.Log("Got new server list of " + lrm.relayServerList.Count);
|
||||||
|
// foreach (Room room in lrm.relayServerList)
|
||||||
|
// {
|
||||||
|
// if (room.serverName == serverName)
|
||||||
|
// {
|
||||||
|
// Debug.Log("Found server for me! Joining now");
|
||||||
|
// NetworkManager.singleton.networkAddress = room.serverId;
|
||||||
|
// NetworkManager.singleton.StartClient();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public class Leaderboard : MonoBehaviour
|
||||||
{
|
{
|
||||||
for (int i = 0; i <= players.Length - 2; i++)
|
for (int i = 0; i <= players.Length - 2; i++)
|
||||||
{
|
{
|
||||||
if ( (isRanked ? players[i].moonsCollected : players[i].Scores) > (isRanked? players[i+1].moonsCollected : players[i + 1].Scores))
|
if ( (!isRanked ? players[i].moonsCollected : players[i].Scores) > (!isRanked? players[i+1].moonsCollected : players[i + 1].Scores))
|
||||||
{
|
{
|
||||||
temp = players[i + 1];
|
temp = players[i + 1];
|
||||||
players[i + 1] = players[i];
|
players[i + 1] = players[i];
|
||||||
|
|
@ -51,7 +51,7 @@ public class Leaderboard : MonoBehaviour
|
||||||
SpaceshipController thisPlayer = players[players.Length-i-1];
|
SpaceshipController thisPlayer = players[players.Length-i-1];
|
||||||
leaderboardItems[i].gameObject.SetActive(true);
|
leaderboardItems[i].gameObject.SetActive(true);
|
||||||
leaderboardItems[i].text = (i+1) + ". " +thisPlayer.pname;
|
leaderboardItems[i].text = (i+1) + ". " +thisPlayer.pname;
|
||||||
if(isRanked){
|
if(!isRanked){
|
||||||
leaderboardItems[i].transform.GetChild(0).GetComponent<Text>().text = thisPlayer.Scores.ToString();
|
leaderboardItems[i].transform.GetChild(0).GetComponent<Text>().text = thisPlayer.Scores.ToString();
|
||||||
}else{
|
}else{
|
||||||
leaderboardItems[i].transform.GetChild(0).GetComponent<Text>().text = (((float)Mathf.Clamp(thisPlayer.moonsCollected,0,30)/ 30f)*100f).ToString("n1") + " %";
|
leaderboardItems[i].transform.GetChild(0).GetComponent<Text>().text = (((float)Mathf.Clamp(thisPlayer.moonsCollected,0,30)/ 30f)*100f).ToString("n1") + " %";
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ public class MatchMaker : MonoBehaviour
|
||||||
public TMP_Text timerTxt;
|
public TMP_Text timerTxt;
|
||||||
public Button btn_cancel;
|
public Button btn_cancel;
|
||||||
float timer;
|
float timer;
|
||||||
public string serverName;
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
if(!DBmanager.LoggedIn){
|
if(!DBmanager.LoggedIn){
|
||||||
|
|
@ -47,8 +46,6 @@ public class MatchMaker : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool isServer =false;
|
|
||||||
IEnumerator FetchMatchmake(){
|
IEnumerator FetchMatchmake(){
|
||||||
|
|
||||||
WWWForm form = new WWWForm();
|
WWWForm form = new WWWForm();
|
||||||
|
|
@ -58,19 +55,31 @@ public class MatchMaker : MonoBehaviour
|
||||||
WWW req = new WWW(DBmanager.phpRoot+"matchmake.php", form);
|
WWW req = new WWW(DBmanager.phpRoot+"matchmake.php", form);
|
||||||
yield return req;
|
yield return req;
|
||||||
Debug.Log(req.text);
|
Debug.Log(req.text);
|
||||||
if(req.text.Contains(DBmanager.username) && !loadedScene){
|
// if(req.text.Contains(DBmanager.username) && !loadedScene){
|
||||||
//Room created!
|
// int port
|
||||||
isServer= req.text.Substring(0,DBmanager.username.Length) == DBmanager.username;
|
// //Room created!
|
||||||
serverName=req.text;
|
// // isServer= req.text.Substring(0,DBmanager.username.Length) == DBmanager.username;
|
||||||
AutoConnect.serverName = serverName;
|
// // serverName=req.text;
|
||||||
AutoConnect.isRankedServer = isServer;
|
// // AutoConnect.serverName = serverName;
|
||||||
// AutoConnect.isRanked = true;
|
// // AutoConnect.isRankedServer = isServer;
|
||||||
Debug.Log($"Room created! [{req.text}] am I the server? : " + isServer);
|
// // AutoConnect.isRanked = true;
|
||||||
|
// Debug.Log($"Room created! [{req.text}] am I the server? : ");
|
||||||
|
|
||||||
|
// LoadingScreen.instance.LoadLevel("MinigameRanked");
|
||||||
|
|
||||||
|
// }else{
|
||||||
|
// //Waiting
|
||||||
|
// }
|
||||||
|
|
||||||
|
try{
|
||||||
|
int port = int.Parse(req.text);
|
||||||
|
if(port > 5000){
|
||||||
|
Debug.Log("Got the port, Lets go!");
|
||||||
|
AutoConnect.serverPort = port;
|
||||||
LoadingScreen.instance.LoadLevel("MinigameRanked");
|
LoadingScreen.instance.LoadLevel("MinigameRanked");
|
||||||
|
}
|
||||||
|
}catch{
|
||||||
|
|
||||||
}else{
|
|
||||||
//Waiting
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,12 @@ public class MinigameManager : NetworkBehaviour
|
||||||
public static MinigameManager instance;
|
public static MinigameManager instance;
|
||||||
public bool isRanked;
|
public bool isRanked;
|
||||||
public bool RankedGameStarted=false;
|
public bool RankedGameStarted=false;
|
||||||
|
[SyncVar(hook =nameof(OnWinnerChanged))]
|
||||||
|
public int winnerId=-1;
|
||||||
|
[SyncVar]
|
||||||
|
public double startedTime = 0;
|
||||||
public GameObject waitingScreen;
|
public GameObject waitingScreen;
|
||||||
|
public RankedGameSummary rankedSummary;
|
||||||
public float mapRadius;
|
public float mapRadius;
|
||||||
public int maxMoons, maxStars = 100;
|
public int maxMoons, maxStars = 100;
|
||||||
public Transform pickupItemsParent;
|
public Transform pickupItemsParent;
|
||||||
|
|
@ -38,7 +43,13 @@ public class MinigameManager : NetworkBehaviour
|
||||||
// if(!DBmanager.LoggedIn){SceneManager.LoadScene(0);} //Signed out, no game for u
|
// if(!DBmanager.LoggedIn){SceneManager.LoadScene(0);} //Signed out, no game for u
|
||||||
|
|
||||||
if(isRanked){
|
if(isRanked){
|
||||||
RankedGameStarted= (FindObjectsOfType<SpaceshipController>().Length >=2);
|
// RankedGameStarted= (FindObjectsOfType<SpaceshipController>().Length >=2);
|
||||||
|
if(!RankedGameStarted && !isServer){
|
||||||
|
SpaceshipController[] players = FindObjectsOfType<SpaceshipController>();
|
||||||
|
if(players.Length >= 2){
|
||||||
|
RankedGameStarted=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
waitingScreen.SetActive(!RankedGameStarted);
|
waitingScreen.SetActive(!RankedGameStarted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,7 +57,51 @@ public class MinigameManager : NetworkBehaviour
|
||||||
|
|
||||||
HandlePickupSpawn();
|
HandlePickupSpawn();
|
||||||
KillOutOfBoundsPlayers();
|
KillOutOfBoundsPlayers();
|
||||||
|
if(isRanked){RankedMechanics();}
|
||||||
|
}
|
||||||
|
|
||||||
|
void RankedMechanics(){
|
||||||
|
SpaceshipController[] players = FindObjectsOfType<SpaceshipController>();
|
||||||
|
if(players.Length < 2){
|
||||||
|
//Not enough players
|
||||||
|
}else{
|
||||||
|
if(!RankedGameStarted){
|
||||||
|
startedTime=NetworkTime.time;
|
||||||
|
}
|
||||||
|
RankedGameStarted=true;
|
||||||
|
if(players[0].moonsCollected >= 30){
|
||||||
|
//player 1 has won
|
||||||
|
winnerId = (int)players[0].netId;
|
||||||
|
// players[0].WonRanked();
|
||||||
|
// players[1].LostRanked();
|
||||||
|
}else if(players[1].moonsCollected >= 30){
|
||||||
|
//player 2 has won
|
||||||
|
winnerId = (int)players[1].netId;
|
||||||
|
|
||||||
|
// players[0].WonRanked();
|
||||||
|
// players[1].LostRanked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(RankedGameStarted && players.Length < 2){
|
||||||
|
//Forfeited!
|
||||||
|
winnerId = (int)players[0].netId;
|
||||||
|
// players[0].WonRanked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnWinnerChanged(int oldVal, int newVal){
|
||||||
|
if(newVal<= 0){return;}
|
||||||
|
Debug.Log($"{newVal} id won!");
|
||||||
|
SpaceshipController localPlayer = SceneData.localPlayer.GetComponent<SpaceshipController>();
|
||||||
|
if(newVal == localPlayer.netId){
|
||||||
|
//We won
|
||||||
|
localPlayer.CmdWonRanked();
|
||||||
|
Debug.Log("Its Me!, I won!");
|
||||||
|
}else{
|
||||||
|
Debug.Log("Its not me, I lost!");
|
||||||
|
localPlayer.CmdLostRanked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KillOutOfBoundsPlayers()
|
void KillOutOfBoundsPlayers()
|
||||||
|
|
|
||||||
22
Assets/Game/Scripts/Minigame/RankedGameSummary.cs
Normal file
22
Assets/Game/Scripts/Minigame/RankedGameSummary.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using TMPro;
|
||||||
|
public class RankedGameSummary : MonoBehaviour
|
||||||
|
{
|
||||||
|
public TMP_Text txtGameOver;
|
||||||
|
public TMP_Text txtTrophies;
|
||||||
|
|
||||||
|
|
||||||
|
public void ShowWin(){
|
||||||
|
txtGameOver.text = "You Won!";
|
||||||
|
txtTrophies.text= "+30";
|
||||||
|
txtTrophies.color = Color.green;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowLoss(){
|
||||||
|
txtGameOver.text = "You Lost!";
|
||||||
|
txtTrophies.text= "-15";
|
||||||
|
txtTrophies.color = Color.red;
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Game/Scripts/Minigame/RankedGameSummary.cs.meta
Normal file
11
Assets/Game/Scripts/Minigame/RankedGameSummary.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 812537ae82c3b8c56ada62732b76a181
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -13,6 +13,7 @@ public class SceneDataHolder : MonoBehaviour
|
||||||
public GameObject metalEarnings;
|
public GameObject metalEarnings;
|
||||||
public TMP_Text survivalTimeTxt;
|
public TMP_Text survivalTimeTxt;
|
||||||
public TMP_Text mostTimeTxt;
|
public TMP_Text mostTimeTxt;
|
||||||
|
public TMP_Text gameOverTxt;
|
||||||
public EventTrigger boostBtn;
|
public EventTrigger boostBtn;
|
||||||
public TMP_Text timerTxt;
|
public TMP_Text timerTxt;
|
||||||
void Awake()
|
void Awake()
|
||||||
|
|
@ -32,8 +33,12 @@ public class SceneDataHolder : MonoBehaviour
|
||||||
xpEarnings.SetActive(xpEarned > 0); metalEarnings.SetActive(metalEarned > 0);
|
xpEarnings.SetActive(xpEarned > 0); metalEarnings.SetActive(metalEarned > 0);
|
||||||
xpEarnings.GetComponentInChildren<TMP_Text>().text = xpEarned.ToString();
|
xpEarnings.GetComponentInChildren<TMP_Text>().text = xpEarned.ToString();
|
||||||
metalEarnings.GetComponentInChildren<TMP_Text>().text = metalEarned.ToString();
|
metalEarnings.GetComponentInChildren<TMP_Text>().text = metalEarned.ToString();
|
||||||
|
if(!MinigameManager.instance.isRanked){
|
||||||
survivalTimeTxt.text = SceneData.SecondsToText(survivalTime);
|
survivalTimeTxt.text = SceneData.SecondsToText(survivalTime);
|
||||||
mostTimeTxt.text = SceneData.SecondsToText(DBmanager.MostTime);
|
mostTimeTxt.text = SceneData.SecondsToText(DBmanager.MostTime);
|
||||||
|
}else{
|
||||||
|
// MinigameManager.instance.rankedSummary.ShowLoss();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,21 @@ using UnityEngine;
|
||||||
using Mirror;
|
using Mirror;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
public class SpaceshipController : NetworkBehaviour
|
public class SpaceshipController : NetworkBehaviour
|
||||||
{
|
{
|
||||||
public SpriteRenderer playerImg;
|
public SpriteRenderer playerImg;
|
||||||
public SkinsData skins;
|
public SkinsData skins;
|
||||||
[SyncVar(hook=nameof(OnSkinChanged))]
|
[SyncVar(hook = nameof(OnSkinChanged))]
|
||||||
public string skinName = null;
|
public string skinName = null;
|
||||||
[SyncVar(hook=nameof(OnPnameChanged))]
|
[SyncVar(hook = nameof(OnPnameChanged))]
|
||||||
public string pname;
|
public string pname;
|
||||||
[SyncVar(hook=nameof(OnScoresChanged))]
|
[SyncVar(hook = nameof(OnScoresChanged))]
|
||||||
public int Scores;
|
public int Scores;
|
||||||
[SyncVar(hook=nameof(OnKillsChanged))]
|
[SyncVar(hook = nameof(OnKillsChanged))]
|
||||||
public int Kills;
|
public int Kills;
|
||||||
[SyncVar(hook=nameof(OnTrailTimeChanged))]
|
[SyncVar(hook = nameof(OnTrailTimeChanged))]
|
||||||
public float trailTime;
|
public float trailTime;
|
||||||
[SyncVar]
|
[SyncVar]
|
||||||
public int moonsCollected;
|
public int moonsCollected;
|
||||||
|
|
@ -25,8 +26,8 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
public bool dead;
|
public bool dead;
|
||||||
[SyncVar]
|
[SyncVar]
|
||||||
public float speed;
|
public float speed;
|
||||||
[SyncVar(hook=nameof(OnScaleChanged))]
|
[SyncVar(hook = nameof(OnScaleChanged))]
|
||||||
public float scaleMultiplier=1;
|
public float scaleMultiplier = 1;
|
||||||
public Text pnameTxt;
|
public Text pnameTxt;
|
||||||
public Transform body;
|
public Transform body;
|
||||||
public TrailMgr trailMgr;
|
public TrailMgr trailMgr;
|
||||||
|
|
@ -39,87 +40,108 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
|
|
||||||
[Header("Client Prediction")]
|
[Header("Client Prediction")]
|
||||||
public SortedDictionary<int, StatePayload> serverStateBuffer = new SortedDictionary<int, StatePayload>();
|
public SortedDictionary<int, StatePayload> serverStateBuffer = new SortedDictionary<int, StatePayload>();
|
||||||
public Vector3 DetourError = new Vector3(0,0.2f,0);
|
public Vector3 DetourError = new Vector3(0, 0.2f, 0);
|
||||||
public Vector3 Detour = Vector3.zero;
|
public Vector3 Detour = Vector3.zero;
|
||||||
public Quaternion RotationDetour = Quaternion.identity;
|
public Quaternion RotationDetour = Quaternion.identity;
|
||||||
public float DetourCorrectionFactor = 0.5f;
|
public float DetourCorrectionFactor = 0.5f;
|
||||||
public float timeDelayErrorFix = 1f;
|
public float timeDelayErrorFix = 1f;
|
||||||
public bool showDebugHUD = false;
|
public bool showDebugHUD = false;
|
||||||
|
|
||||||
public float distanceFromCenter= 0;
|
public float distanceFromCenter = 0;
|
||||||
|
|
||||||
[Command]
|
[Command]
|
||||||
void CmdSetPname(string value){
|
void CmdSetPname(string value)
|
||||||
|
{
|
||||||
pname = value;
|
pname = value;
|
||||||
}
|
}
|
||||||
void OnPnameChanged(string oldName, string newName){
|
void OnPnameChanged(string oldName, string newName)
|
||||||
|
{
|
||||||
pnameTxt.text = newName;
|
pnameTxt.text = newName;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command]
|
[Command]
|
||||||
void CmdSetSkin(string newSkin){
|
void CmdSetSkin(string newSkin)
|
||||||
|
{
|
||||||
skinName = newSkin;
|
skinName = newSkin;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnSkinChanged(string oldSkin, string newSkin){
|
void OnSkinChanged(string oldSkin, string newSkin)
|
||||||
|
{
|
||||||
ChangeSkin(newSkin);
|
ChangeSkin(newSkin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChangeSkin(string name){
|
void ChangeSkin(string name)
|
||||||
Sprite newSprite = SkinManagerHelper.getSkinSprite(name,skins);
|
{
|
||||||
|
Sprite newSprite = SkinManagerHelper.getSkinSprite(name, skins);
|
||||||
playerImg.sprite = newSprite;
|
playerImg.sprite = newSprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OnScoresChanged(int oldScores, int newScores){
|
void OnScoresChanged(int oldScores, int newScores)
|
||||||
Debug.Log($"Add scores { newScores - oldScores}, (total: {newScores})");
|
{
|
||||||
|
Debug.Log($"Add scores {newScores - oldScores}, (total: {newScores})");
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnTrailTimeChanged(float oldValue, float newValue){
|
void OnTrailTimeChanged(float oldValue, float newValue)
|
||||||
|
{
|
||||||
trailMgr.trail.time = newValue;
|
trailMgr.trail.time = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnBoostDown(){
|
void OnBoostDown()
|
||||||
if(isLocalPlayer){
|
{
|
||||||
if(isServer){
|
if (isLocalPlayer)
|
||||||
boosting=true;
|
{
|
||||||
}else{
|
if (isServer)
|
||||||
|
{
|
||||||
|
boosting = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
CmdSetBoosting(true);
|
CmdSetBoosting(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnBoostUp(){
|
void OnBoostUp()
|
||||||
if(isLocalPlayer){
|
{
|
||||||
if(isServer){
|
if (isLocalPlayer)
|
||||||
boosting=false;
|
{
|
||||||
}else{
|
if (isServer)
|
||||||
|
{
|
||||||
|
boosting = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
CmdSetBoosting(false);
|
CmdSetBoosting(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnScaleChanged(float oldScale, float newScale){
|
void OnScaleChanged(float oldScale, float newScale)
|
||||||
if(isLocalPlayer){
|
{
|
||||||
SceneData.holder.boostBtn.gameObject.SetActive(newScale>1);
|
if (isLocalPlayer)
|
||||||
|
{
|
||||||
|
SceneData.holder.boostBtn.gameObject.SetActive(newScale > 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command]
|
[Command]
|
||||||
void CmdSetBoosting(bool value){
|
void CmdSetBoosting(bool value)
|
||||||
boosting=value;
|
{
|
||||||
|
boosting = value;
|
||||||
}
|
}
|
||||||
[SyncVar]
|
[SyncVar]
|
||||||
double startedTime = 0;
|
double startedTime = 0;
|
||||||
|
|
||||||
void ResetStats(){
|
void ResetStats()
|
||||||
|
{
|
||||||
startedXp = DBmanager.Xp;
|
startedXp = DBmanager.Xp;
|
||||||
startedMetal = DBmanager.Metal;
|
startedMetal = DBmanager.Metal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
scaleMultiplier=1;
|
scaleMultiplier = 1;
|
||||||
if (isLocalPlayer)
|
if (isLocalPlayer)
|
||||||
{
|
{
|
||||||
ResetStats();
|
ResetStats();
|
||||||
|
|
@ -130,17 +152,25 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
SceneData.OnBoostDown.AddListener(OnBoostDown);
|
SceneData.OnBoostDown.AddListener(OnBoostDown);
|
||||||
SceneData.OnBoostUp.AddListener(OnBoostUp);
|
SceneData.OnBoostUp.AddListener(OnBoostUp);
|
||||||
//Set username
|
//Set username
|
||||||
if(isServer){pname=myName;}else{
|
if (isServer) { pname = myName; }
|
||||||
|
else
|
||||||
|
{
|
||||||
CmdSetPname(myName);
|
CmdSetPname(myName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set Skin
|
//Set Skin
|
||||||
if(!DBmanager.SkinsPurchased.Contains(SkinShopManager.GetEquipedSkin())){
|
if (!DBmanager.SkinsPurchased.Contains(SkinShopManager.GetEquipedSkin()))
|
||||||
|
{
|
||||||
//False skin purchase
|
//False skin purchase
|
||||||
}else{
|
}
|
||||||
if(isServer){
|
else
|
||||||
|
{
|
||||||
|
if (isServer)
|
||||||
|
{
|
||||||
skinName = SkinShopManager.GetEquipedSkin();
|
skinName = SkinShopManager.GetEquipedSkin();
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
CmdSetSkin(SkinShopManager.GetEquipedSkin());
|
CmdSetSkin(SkinShopManager.GetEquipedSkin());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -162,27 +192,29 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
int lastClientUpdateTime = 0;
|
int lastClientUpdateTime = 0;
|
||||||
void FixedUpdate()
|
void FixedUpdate()
|
||||||
{
|
{
|
||||||
if(MinigameManager.instance.isRanked && !MinigameManager.instance.RankedGameStarted){return;}
|
if (MinigameManager.instance.isRanked && !MinigameManager.instance.RankedGameStarted) { return; }
|
||||||
distanceFromCenter = Vector3.Distance(transform.position, Vector3.zero);
|
distanceFromCenter = Vector3.Distance(transform.position, Vector3.zero);
|
||||||
pnameTxt.rectTransform.rotation = Quaternion.Euler(Vector3.zero);
|
pnameTxt.rectTransform.rotation = Quaternion.Euler(Vector3.zero);
|
||||||
|
|
||||||
//Update size of trail and spaceship
|
//Update size of trail and spaceship
|
||||||
transform.localScale = Vector3.Lerp(transform.localScale,new Vector3(scaleMultiplier,scaleMultiplier,scaleMultiplier),0.1f);
|
transform.localScale = Vector3.Lerp(transform.localScale, new Vector3(scaleMultiplier, scaleMultiplier, scaleMultiplier), 0.1f);
|
||||||
trailMgr.trail.startWidth = Mathf.Lerp(trailMgr.trail.startWidth,scaleMultiplier,0.1f);
|
trailMgr.trail.startWidth = Mathf.Lerp(trailMgr.trail.startWidth, scaleMultiplier, 0.1f);
|
||||||
|
|
||||||
if(dead){return;}
|
if (dead) { return; }
|
||||||
|
|
||||||
if (isLocalPlayer)
|
if (isLocalPlayer)
|
||||||
{
|
{
|
||||||
joyInput = joystick.input;
|
joyInput = joystick.input;
|
||||||
|
|
||||||
//Cheats => TODO: Remove this
|
//Cheats => TODO: Remove this
|
||||||
if(Input.GetKeyDown(KeyCode.F)){
|
if (Input.GetKeyDown(KeyCode.F))
|
||||||
|
{
|
||||||
CmdCheatKills();
|
CmdCheatKills();
|
||||||
}
|
}
|
||||||
// Debug.Log(startedTime-NetworkTime.time);
|
// Debug.Log(startedTime-NetworkTime.time);
|
||||||
double survivalTime = (startedTime ==0) ? 0 :NetworkTime.time - startedTime;
|
double survivalTime = (startedTime == 0) ? 0 : NetworkTime.time - ((MinigameManager.instance.isRanked)? MinigameManager.instance.startedTime :startedTime);
|
||||||
if(DBmanager.MostTime < (int)survivalTime){
|
if (DBmanager.MostTime < (int)survivalTime)
|
||||||
|
{
|
||||||
DBmanager.SetMostTime((int)survivalTime);
|
DBmanager.SetMostTime((int)survivalTime);
|
||||||
}
|
}
|
||||||
SceneData.SetTimerTxt(survivalTime);
|
SceneData.SetTimerTxt(survivalTime);
|
||||||
|
|
@ -197,15 +229,19 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isServer){
|
if (isServer)
|
||||||
|
{
|
||||||
//boost check
|
//boost check
|
||||||
if(boosting && scaleMultiplier > 1){
|
if (boosting && scaleMultiplier > 1)
|
||||||
speed= movingSpeed*2;
|
{
|
||||||
scaleMultiplier-=Time.deltaTime;
|
speed = movingSpeed * 2;
|
||||||
|
scaleMultiplier -= Time.deltaTime;
|
||||||
|
|
||||||
if(scaleMultiplier<1){scaleMultiplier=1;} //Clamp in case gets lower
|
if (scaleMultiplier < 1) { scaleMultiplier = 1; } //Clamp in case gets lower
|
||||||
}else{
|
}
|
||||||
speed=movingSpeed;
|
else
|
||||||
|
{
|
||||||
|
speed = movingSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
///Diff = rot1 . rot2
|
///Diff = rot1 . rot2
|
||||||
|
|
@ -221,15 +257,16 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
{
|
{
|
||||||
Vector3 newPosition = body.position + Detour;
|
Vector3 newPosition = body.position + Detour;
|
||||||
Quaternion newRotation = body.rotation * RotationDetour;
|
Quaternion newRotation = body.rotation * RotationDetour;
|
||||||
if(Detour.magnitude > 0.5f){
|
if (Detour.magnitude > 0.5f)
|
||||||
trailMgr.trail.emitting =false;
|
{
|
||||||
|
trailMgr.trail.emitting = false;
|
||||||
}
|
}
|
||||||
body.position = Vector3.Lerp(body.position, newPosition, (Mathf.Abs(Detour.magnitude) > 0.2f) ? DetourCorrectionFactor * 2 * Detour.magnitude : DetourCorrectionFactor);
|
body.position = Vector3.Lerp(body.position, newPosition, (Mathf.Abs(Detour.magnitude) > 0.2f) ? DetourCorrectionFactor * 2 * Detour.magnitude : DetourCorrectionFactor);
|
||||||
Detour = newPosition - body.position;
|
Detour = newPosition - body.position;
|
||||||
body.rotation = Quaternion.Lerp(body.rotation, newRotation, DetourCorrectionFactor * ((joystick.touchDown) ? 0.1f : 1));
|
body.rotation = Quaternion.Lerp(body.rotation, newRotation, DetourCorrectionFactor * ((joystick.touchDown) ? 0.1f : 1));
|
||||||
RotationDetour = Quaternion.Inverse(transform.rotation) * newRotation;
|
RotationDetour = Quaternion.Inverse(transform.rotation) * newRotation;
|
||||||
|
|
||||||
trailMgr.trail.emitting=true;
|
trailMgr.trail.emitting = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,7 +295,9 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
}
|
}
|
||||||
RpcUpdatePosition(joyInput, transform.position, transform.rotation, timeInMillis);
|
RpcUpdatePosition(joyInput, transform.position, transform.rotation, timeInMillis);
|
||||||
RpcUpdateTrail(trailMgr.positions);
|
RpcUpdateTrail(trailMgr.positions);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
transform.position = Vector3.Lerp(transform.position, targetPosition, 0.1f);
|
transform.position = Vector3.Lerp(transform.position, targetPosition, 0.1f);
|
||||||
transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, 0.1f);
|
transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, 0.1f);
|
||||||
}
|
}
|
||||||
|
|
@ -336,9 +375,9 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
[ClientRpc]
|
[ClientRpc]
|
||||||
void RpcUpdatePosition(Vector2 input, Vector3 position, Quaternion rotation, double sentTime)
|
void RpcUpdatePosition(Vector2 input, Vector3 position, Quaternion rotation, double sentTime)
|
||||||
{
|
{
|
||||||
if(isLocalPlayer || isServer){return;}
|
if (isLocalPlayer || isServer) { return; }
|
||||||
double delay = (timeInMillis - sentTime) * timeDelayErrorFix;
|
double delay = (timeInMillis - sentTime) * timeDelayErrorFix;
|
||||||
int numberOfFrames = (int)((float)(delay/1000f) *50f);
|
int numberOfFrames = (int)((float)(delay / 1000f) * 50f);
|
||||||
|
|
||||||
Quaternion newRotation = rotation;
|
Quaternion newRotation = rotation;
|
||||||
Vector3 direction = (rotation * Vector3.forward).normalized;
|
Vector3 direction = (rotation * Vector3.forward).normalized;
|
||||||
|
|
@ -363,7 +402,7 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
if (sentTime < lastRubberBandTime) { Debug.Log("Old rubber band rpc, ignoree..."); return; }
|
if (sentTime < lastRubberBandTime) { Debug.Log("Old rubber band rpc, ignoree..."); return; }
|
||||||
//Lag comprehension
|
//Lag comprehension
|
||||||
double delay = (timeInMillis - sentTime) * timeDelayErrorFix;
|
double delay = (timeInMillis - sentTime) * timeDelayErrorFix;
|
||||||
int numberOfFrames = (int)((float)(delay/1000f) * 50f);
|
int numberOfFrames = (int)((float)(delay / 1000f) * 50f);
|
||||||
|
|
||||||
Quaternion newRotation = rotation;
|
Quaternion newRotation = rotation;
|
||||||
Vector3 direction = (rotation * Vector3.forward).normalized;
|
Vector3 direction = (rotation * Vector3.forward).normalized;
|
||||||
|
|
@ -402,12 +441,13 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
RotationDetour = Quaternion.Inverse(transform.rotation) * newRotation;
|
RotationDetour = Quaternion.Inverse(transform.rotation) * newRotation;
|
||||||
lastRubberBandTime = sentTime;
|
lastRubberBandTime = sentTime;
|
||||||
|
|
||||||
// Debug.Log($"Rubber banded (Detour of pos:{Detour}, rotation: {RotationDetour}) you to {transform.position}, @ {sentTime} (delay: {delay}");
|
// Debug.Log($"Rubber banded (Detour of pos:{Detour}, rotation: {RotationDetour}) you to {transform.position}, @ {sentTime} (delay: {delay}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ClientRpc]
|
[ClientRpc]
|
||||||
void RpcUpdateTrail(Vector3[] positions){
|
void RpcUpdateTrail(Vector3[] positions)
|
||||||
|
{
|
||||||
//trailMgr.trail.SetPositions(positions);
|
//trailMgr.trail.SetPositions(positions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -438,15 +478,18 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
{
|
{
|
||||||
body = transform;
|
body = transform;
|
||||||
}
|
}
|
||||||
if(trailMgr==null){
|
if (trailMgr == null)
|
||||||
|
{
|
||||||
trailMgr = GetComponent<TrailMgr>();
|
trailMgr = GetComponent<TrailMgr>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void TrailCollided(Collider2D hit){
|
public void TrailCollided(Collider2D hit)
|
||||||
if(!isServer){
|
{
|
||||||
|
if (!isServer)
|
||||||
|
{
|
||||||
Debug.Log("Got hit : " + hit.name);
|
Debug.Log("Got hit : " + hit.name);
|
||||||
// Debug.Log("This cannot run on client, That's illegal!"); // <-- What this log says
|
// Debug.Log("This cannot run on client, That's illegal!"); // <-- What this log says
|
||||||
return;
|
return;
|
||||||
|
|
@ -454,55 +497,64 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
|
|
||||||
SpaceshipController deadPlayer = hit.GetComponent<SpaceshipController>();
|
SpaceshipController deadPlayer = hit.GetComponent<SpaceshipController>();
|
||||||
Debug.Log("got hit by player? : " + deadPlayer != null);
|
Debug.Log("got hit by player? : " + deadPlayer != null);
|
||||||
if(deadPlayer!=null && !deadPlayer.dead){ // <-- okay we killed someone | KILLCODE
|
if (deadPlayer != null && !deadPlayer.dead && (NetworkTime.time- deadPlayer.startedTime) > 5)
|
||||||
|
{ // <-- okay we killed someone | KILLCODE
|
||||||
deadPlayer.Die(pname);
|
deadPlayer.Die(pname);
|
||||||
Debug.Log($"{pname} killed {deadPlayer.pname}");
|
Debug.Log($"{pname} killed {deadPlayer.pname}");
|
||||||
OnKill();
|
OnKill();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnKill(){
|
void OnKill()
|
||||||
|
{
|
||||||
Kills++;
|
Kills++;
|
||||||
Scores+= 10; //TODO: Need to change Scores on kills?
|
Scores += 10; //TODO: Need to change Scores on kills?
|
||||||
scaleMultiplier+=0.05f;
|
scaleMultiplier += 0.05f;
|
||||||
OnScaleChanged(scaleMultiplier,scaleMultiplier);
|
OnScaleChanged(scaleMultiplier, scaleMultiplier);
|
||||||
IncreaseTrail(trailIncrementRate);
|
IncreaseTrail(trailIncrementRate);
|
||||||
RpcOnKill();
|
RpcOnKill();
|
||||||
}
|
}
|
||||||
|
|
||||||
[ClientRpc]
|
[ClientRpc]
|
||||||
void RpcOnKill(){
|
void RpcOnKill()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnKillsChanged(int oldVal, int newVal){
|
void OnKillsChanged(int oldVal, int newVal)
|
||||||
if(isLocalPlayer){
|
{
|
||||||
|
if (isLocalPlayer)
|
||||||
|
{
|
||||||
Debug.Log("Show kills for " + newVal);
|
Debug.Log("Show kills for " + newVal);
|
||||||
KillText.Show(newVal);
|
KillText.Show(newVal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IncreaseTrail(float rate){
|
void IncreaseTrail(float rate)
|
||||||
trailTime = trailMgr.trail.time+ rate;
|
{
|
||||||
|
trailTime = trailMgr.trail.time + rate;
|
||||||
trailMgr.trail.time = trailTime;
|
trailMgr.trail.time = trailTime;
|
||||||
Debug.Log("Increasing trail of" + pname);
|
Debug.Log("Increasing trail of" + pname);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command]
|
[Command]
|
||||||
void CmdCheatKills(){
|
void CmdCheatKills()
|
||||||
|
{
|
||||||
OnKill();
|
OnKill();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CollectPickup(PickupItem.PickupType type){
|
public void CollectPickup(PickupItem.PickupType type)
|
||||||
if(!isServer){Debug.Log("Server function ran on client. That's illegal!");} // <-- What this log says
|
{
|
||||||
switch(type){
|
if (!isServer) { Debug.Log("Server function ran on client. That's illegal!"); } // <-- What this log says
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
case PickupItem.PickupType.Moon:
|
case PickupItem.PickupType.Moon:
|
||||||
IncreaseTrail(trailIncrementRate);
|
IncreaseTrail(trailIncrementRate);
|
||||||
moonsCollected++;
|
moonsCollected++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PickupItem.PickupType.Star:
|
case PickupItem.PickupType.Star:
|
||||||
IncreaseTrail(trailIncrementRate/2f);
|
IncreaseTrail(trailIncrementRate / 2f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -510,24 +562,27 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
[ClientRpc]
|
[ClientRpc]
|
||||||
void RpcCollectPickup(PickupItem.PickupType type){
|
void RpcCollectPickup(PickupItem.PickupType type)
|
||||||
if(isLocalPlayer){
|
{
|
||||||
MinigameManager.instance.GainMetals((type==PickupItem.PickupType.Star) ? 10 : 30);
|
if (isLocalPlayer)
|
||||||
|
{
|
||||||
|
MinigameManager.instance.GainMetals((type == PickupItem.PickupType.Star) ? 2 : 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Die(string killer){
|
public void Die(string killer)
|
||||||
|
{
|
||||||
|
|
||||||
MinigameManager.instance.SpawnLeftoverPickups(transform.position, Scores);
|
MinigameManager.instance.SpawnLeftoverPickups(transform.position, Scores);
|
||||||
Debug.Log($"Sending death signal to {pname} by {killer}");
|
Debug.Log($"Sending death signal to {pname} by {killer}");
|
||||||
|
|
||||||
//Handle Respawning
|
//Handle Respawning
|
||||||
OnScaleChanged(scaleMultiplier,1);
|
OnScaleChanged(scaleMultiplier, 1);
|
||||||
scaleMultiplier=1;
|
scaleMultiplier = 1;
|
||||||
dead=true;
|
dead = true;
|
||||||
Scores=0;
|
Scores = 0;
|
||||||
Kills=0;
|
Kills = 0;
|
||||||
startedTime=NetworkTime.time;
|
startedTime = NetworkTime.time;
|
||||||
trailTime = 1;
|
trailTime = 1;
|
||||||
trailMgr.trail.time = trailTime;
|
trailMgr.trail.time = trailTime;
|
||||||
RpcDie(killer);
|
RpcDie(killer);
|
||||||
|
|
@ -538,59 +593,153 @@ public class SpaceshipController : NetworkBehaviour
|
||||||
private int startedXp;
|
private int startedXp;
|
||||||
private int startedMetal;
|
private int startedMetal;
|
||||||
|
|
||||||
|
bool RewardedRankedMetal =false;
|
||||||
|
|
||||||
[ClientRpc]
|
[ClientRpc]
|
||||||
public void RpcDie(string killer){
|
public void RpcDie(string killer)
|
||||||
|
{
|
||||||
Debug.Log($"{killer} killed {pname} : isItMe? -> {isLocalPlayer}");
|
Debug.Log($"{killer} killed {pname} : isItMe? -> {isLocalPlayer}");
|
||||||
KillfeedMgr.instance.AddNewEntry($"<b>{pname}</b> was killed by <b>{killer}</b>");
|
KillfeedMgr.instance.AddNewEntry($"<b>{pname}</b> was killed by <b>{killer}</b>");
|
||||||
gameObject.SetActive(false);
|
gameObject.SetActive(false);
|
||||||
if(isLocalPlayer){
|
if (isLocalPlayer)
|
||||||
|
{
|
||||||
//TODO: Death message goes here
|
//TODO: Death message goes here
|
||||||
SceneData.holder.ShowDeadscreen(DBmanager.Xp - startedXp, DBmanager.Metal - startedMetal, NetworkTime.time - startedTime);
|
SceneData.holder.ShowDeadscreen(DBmanager.Xp - startedXp, DBmanager.Metal - startedMetal, NetworkTime.time - startedTime);
|
||||||
|
if (MinigameManager.instance.isRanked)
|
||||||
|
{
|
||||||
|
// MinigameManager.instance.rankedSummary.ShowLoss();
|
||||||
|
// StartCoroutine(ShowRankedResults());
|
||||||
|
if(MinigameManager.instance.winnerId<=0){
|
||||||
|
Debug.LogError("Winner ID not synced yet");
|
||||||
|
}
|
||||||
|
if (MinigameManager.instance.winnerId != netId)
|
||||||
|
{
|
||||||
|
//LOSER!
|
||||||
|
MinigameManager.instance.rankedSummary.ShowLoss();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MinigameManager.instance.rankedSummary.ShowWin();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Respawn(Vector3 respawnPoint){
|
IEnumerator ShowRankedResults()
|
||||||
|
{
|
||||||
|
while (MinigameManager.instance.winnerId <= 0)
|
||||||
|
{
|
||||||
|
yield return new WaitForFixedUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Respawn(Vector3 respawnPoint)
|
||||||
|
{
|
||||||
Debug.Log("Respawning " + pname);
|
Debug.Log("Respawning " + pname);
|
||||||
|
|
||||||
if(isServer){
|
if (isServer)
|
||||||
|
{
|
||||||
respawn(respawnPoint);
|
respawn(respawnPoint);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
CmdRespawn(respawnPoint);
|
CmdRespawn(respawnPoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command]
|
[Command]
|
||||||
void CmdRespawn(Vector3 respawnPoint){
|
void CmdRespawn(Vector3 respawnPoint)
|
||||||
|
{
|
||||||
respawn(respawnPoint);
|
respawn(respawnPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void respawn(Vector3 respawnPoint){
|
public void respawn(Vector3 respawnPoint)
|
||||||
dead=false;
|
{
|
||||||
trailMgr.trail.emitting =false;
|
dead = false;
|
||||||
|
trailMgr.trail.emitting = false;
|
||||||
trailMgr.trail.Clear();
|
trailMgr.trail.Clear();
|
||||||
RpcRespawn(respawnPoint);
|
RpcRespawn(respawnPoint);
|
||||||
transform.position = respawnPoint;
|
transform.position = respawnPoint;
|
||||||
trailMgr.trail.emitting=true;
|
trailMgr.trail.emitting = true;
|
||||||
gameObject.SetActive(true);
|
gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ClientRpc]
|
[ClientRpc]
|
||||||
public void RpcRespawn(Vector3 respawnPoint){
|
public void RpcRespawn(Vector3 respawnPoint)
|
||||||
|
{
|
||||||
|
|
||||||
GetComponent<NetworkTrail>().enableValidation=false;
|
GetComponent<NetworkTrail>().enableValidation = false;
|
||||||
trailMgr.trail.Clear();
|
trailMgr.trail.Clear();
|
||||||
trailMgr.positions = new Vector3[0];
|
trailMgr.positions = new Vector3[0];
|
||||||
trailMgr.trail.emitting = false;
|
trailMgr.trail.emitting = false;
|
||||||
transform.position = respawnPoint;
|
transform.position = respawnPoint;
|
||||||
trailMgr.trail.emitting=true;
|
trailMgr.trail.emitting = true;
|
||||||
GetComponent<NetworkTrail>().enableValidation=true;
|
GetComponent<NetworkTrail>().enableValidation = true;
|
||||||
gameObject.SetActive(true);
|
gameObject.SetActive(true);
|
||||||
|
|
||||||
if(isLocalPlayer){
|
if (isLocalPlayer)
|
||||||
|
{
|
||||||
SceneData.holder.deadScreen.SetActive(false);
|
SceneData.holder.deadScreen.SetActive(false);
|
||||||
ResetStats();
|
ResetStats();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[Command]
|
||||||
|
public void CmdWonRanked(){
|
||||||
|
WonRanked();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command]
|
||||||
|
public void CmdLostRanked(){
|
||||||
|
LostRanked();
|
||||||
|
}
|
||||||
|
public void WonRanked()
|
||||||
|
{
|
||||||
|
if (!isServer)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
RpcWonRanked();
|
||||||
|
Die("server");
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClientRpc]
|
||||||
|
void RpcWonRanked()
|
||||||
|
{
|
||||||
|
if (isLocalPlayer)
|
||||||
|
{
|
||||||
|
DBmanager.SetMetal(DBmanager.Metal+500);
|
||||||
|
MinigameManager.instance.rankedSummary.ShowWin();
|
||||||
|
//Add trophies
|
||||||
|
DBmanager.SetTrophies(DBmanager.Trophies + 30);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LostRanked()
|
||||||
|
{
|
||||||
|
if (!isServer)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RpcLostRanked();
|
||||||
|
Die("server");
|
||||||
|
}
|
||||||
|
|
||||||
|
void RpcLostRanked()
|
||||||
|
{
|
||||||
|
if (isLocalPlayer)
|
||||||
|
{
|
||||||
|
DBmanager.SetMetal(DBmanager.Metal+250);
|
||||||
|
|
||||||
|
MinigameManager.instance.rankedSummary.ShowLoss();
|
||||||
|
DBmanager.SetTrophies(Mathf.Clamp(DBmanager.Trophies - 15, 0, int.MaxValue));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@ public class RegionManager : MonoBehaviour
|
||||||
UpdateSelectedRegion();
|
UpdateSelectedRegion();
|
||||||
|
|
||||||
foreach(RegionServerData server in servers){
|
foreach(RegionServerData server in servers){
|
||||||
|
if(PlayerPrefs.HasKey("regionOverride")){
|
||||||
|
if(PlayerPrefs.GetString("regionOverride") == server.name){
|
||||||
|
selectedServer = server;
|
||||||
|
}
|
||||||
|
}
|
||||||
server.btn_select.onClick.AddListener(()=>{SetRegionOverride(server.name);});
|
server.btn_select.onClick.AddListener(()=>{SetRegionOverride(server.name);});
|
||||||
}
|
}
|
||||||
btn_auto.onClick.AddListener(()=>{ SetRegionOverride(""); });
|
btn_auto.onClick.AddListener(()=>{ SetRegionOverride(""); });
|
||||||
|
|
|
||||||
8
Assets/Game/Scripts/Shop.meta
Normal file
8
Assets/Game/Scripts/Shop.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f3f4943072bf1ac4d8c69666654fc1f4
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
84
Assets/Game/Scripts/Shop/ChestButton.cs
Normal file
84
Assets/Game/Scripts/Shop/ChestButton.cs
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using TMPro;
|
||||||
|
public class ChestButton : MonoBehaviour
|
||||||
|
{
|
||||||
|
public bool IsSpecial = false;
|
||||||
|
public bool readFromTexts;
|
||||||
|
public TMP_Text txtPrice;
|
||||||
|
public TMP_Text txtChestName;
|
||||||
|
public string ChestName => txtChestName.text;
|
||||||
|
public int Price;
|
||||||
|
public float minLuck = 0;
|
||||||
|
public float maxLuck = 100;
|
||||||
|
public Button btnInfo;
|
||||||
|
[TextArea]
|
||||||
|
public string infoTxt;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
btnInfo.onClick.AddListener(OnClickedInfo);
|
||||||
|
|
||||||
|
if(!IsSpecial)GetComponent<Button>().onClick.AddListener(OnClick);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnClickedInfo()
|
||||||
|
{
|
||||||
|
MessageDialog.instance.ShowDialog(ChestName, $"This chest will drop following items.\n\n{getItemsProbability()}");
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnClick(){
|
||||||
|
if(DBmanager.Gems < Price){
|
||||||
|
MessageDialog.instance.ShowDialog("Failed","Insufficient Gems to complete the Purchase!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DBmanager.SetGems(DBmanager.Gems - Price);
|
||||||
|
ChestOpener.instance.OpenChest((int)minLuck, (int)maxLuck);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string getItemsProbability()
|
||||||
|
{
|
||||||
|
string items = "Gold";
|
||||||
|
|
||||||
|
if (maxLuck > 50)
|
||||||
|
{
|
||||||
|
float probability = ((maxLuck - 50f) / (maxLuck - minLuck)) * 100f;
|
||||||
|
items += $"\nGems : {probability.ToString("n1")}%";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxLuck > 70)
|
||||||
|
{
|
||||||
|
//some skins
|
||||||
|
float probability = ((maxLuck - 70f) / (maxLuck - minLuck)) * 100f;
|
||||||
|
items += $"\nCommon Skin : {probability.ToString("n1")}%";
|
||||||
|
}
|
||||||
|
if (maxLuck > 85)
|
||||||
|
{
|
||||||
|
float probability = ((maxLuck - 85f) / (maxLuck - minLuck)) * 100f;
|
||||||
|
items += $"\nRare Skin : {probability.ToString("n1")}%";
|
||||||
|
}
|
||||||
|
if (maxLuck > 95)
|
||||||
|
{
|
||||||
|
float probability = ((maxLuck - 95f) / (maxLuck - minLuck)) * 100f;
|
||||||
|
items += $"\nLegendary Skin : {probability.ToString("n1")}%";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnValidate()
|
||||||
|
{
|
||||||
|
infoTxt = getItemsProbability();
|
||||||
|
|
||||||
|
if (!readFromTexts) { return; }
|
||||||
|
|
||||||
|
if (txtPrice != null)
|
||||||
|
{
|
||||||
|
Price = int.Parse(txtPrice.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Game/Scripts/Shop/ChestButton.cs.meta
Normal file
11
Assets/Game/Scripts/Shop/ChestButton.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3a00d06b92d7a4dd78fab8529a589430
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
34
Assets/Game/Scripts/Shop/GoldPackButton.cs
Normal file
34
Assets/Game/Scripts/Shop/GoldPackButton.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class GoldPackButton : MonoBehaviour
|
||||||
|
{
|
||||||
|
public bool autoReadFromText = true;
|
||||||
|
public TMP_Text txtAmount;
|
||||||
|
public TMP_Text txtPrice;
|
||||||
|
public int Amount;
|
||||||
|
public int Price;
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
GetComponent<Button>().onClick.AddListener(()=>{GameManager.instance.BuyGold(this);});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnValidate() {
|
||||||
|
if(!autoReadFromText){return;}
|
||||||
|
if(txtAmount!=null){
|
||||||
|
Amount = int.Parse(txtAmount.text.Replace(",",""));
|
||||||
|
}
|
||||||
|
if(txtPrice!=null){
|
||||||
|
Price = int.Parse(txtPrice.text.Replace(",",""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Game/Scripts/Shop/GoldPackButton.cs.meta
Normal file
11
Assets/Game/Scripts/Shop/GoldPackButton.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5cf2108220cbbf8449f5acdb4be74f69
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
90
Assets/Game/Scripts/Shop/SpecialChest.cs
Normal file
90
Assets/Game/Scripts/Shop/SpecialChest.cs
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class SpecialChest : MonoBehaviour
|
||||||
|
{
|
||||||
|
public int quantity=3;
|
||||||
|
public DateTime lastCollectedTime;
|
||||||
|
public ChestButton chestButton;
|
||||||
|
public TMP_Text txtTimeLeft;
|
||||||
|
public Button button;
|
||||||
|
void Start(){
|
||||||
|
button.onClick.AddListener(OnClicked);
|
||||||
|
StartCoroutine(LoadData());
|
||||||
|
}
|
||||||
|
DateTime specialChestExpire=DateTime.MinValue;
|
||||||
|
float t =30;
|
||||||
|
IEnumerator LoadData(){
|
||||||
|
WWW storeData = new WWW(DBmanager.phpRoot + "get_store_data.php");
|
||||||
|
yield return storeData;
|
||||||
|
|
||||||
|
Debug.Log(storeData.text + " => " + DBmanager.LastCollectedDailyChest);
|
||||||
|
specialChestExpire= DateTime.Parse(storeData.text);
|
||||||
|
}
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(t < 30){
|
||||||
|
t +=Time.deltaTime;
|
||||||
|
}else{
|
||||||
|
t=0;
|
||||||
|
UpdateStat();
|
||||||
|
}
|
||||||
|
|
||||||
|
// if((DateTime.Now - DBmanager.LastCollectedDailyChest).TotalHours > 24){
|
||||||
|
// button.interactable = true;
|
||||||
|
// txtTimeLeft.text = "Ready";
|
||||||
|
// }else{
|
||||||
|
// button.interactable = false;
|
||||||
|
// // txtTimeLeft.text = SceneData.SecondsToText((DateTime.Now - DBmanager.LastCollectedDailyChest).Seconds);
|
||||||
|
// txtTimeLeft.text = MinutesToText((24*60)-(DateTime.Now - DBmanager.LastCollectedDailyChest).TotalMinutes);
|
||||||
|
// // Debug.Log(DateTime.Now + "-" + DBmanager.LastCollectedDailyChest + " = " + (DateTime.Now - DBmanager.LastCollectedDailyChest));
|
||||||
|
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void UpdateStat(){
|
||||||
|
if(specialChestExpire == DateTime.MinValue){ chestButton.gameObject.SetActive(false);}
|
||||||
|
DateTime nowTime = await DBmanager.GetNetworkTime();
|
||||||
|
if(specialChestExpire < nowTime){
|
||||||
|
chestButton.gameObject.SetActive(false);
|
||||||
|
}else if(DBmanager.LastCollectedDailyChest == specialChestExpire){
|
||||||
|
chestButton.gameObject.SetActive(false);
|
||||||
|
}else{
|
||||||
|
//Set the timer
|
||||||
|
chestButton.gameObject.SetActive(true);
|
||||||
|
txtTimeLeft.text = MinutesToText(specialChestExpire.Subtract(nowTime).TotalMinutes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnClicked(){
|
||||||
|
// gameObject.SetActive(false);
|
||||||
|
if(DBmanager.Gems < chestButton.Price){
|
||||||
|
MessageDialog.instance.ShowDialog("Failed","Insufficient Gems to complete the Purchase!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
DBmanager.SetGems(DBmanager.Gems - chestButton.Price);
|
||||||
|
DBmanager.SetLastCollectedDailyChest(specialChestExpire.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
UpdateStat();
|
||||||
|
StartCoroutine(StartChestList());
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator StartChestList(){
|
||||||
|
for(int i=0; i< quantity; i++){
|
||||||
|
ChestOpener.instance.OpenChest((int)chestButton.minLuck, (int)chestButton.maxLuck);
|
||||||
|
while(ChestOpener.instance.active){
|
||||||
|
yield return new WaitForEndOfFrame();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string MinutesToText(double minutes){
|
||||||
|
int mins = ((int)(minutes % 60));
|
||||||
|
int hours = Mathf.FloorToInt((float)(minutes/60));
|
||||||
|
return hours + "h "+ mins.ToString("0") + "m";
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Game/Scripts/Shop/SpecialChest.cs.meta
Normal file
11
Assets/Game/Scripts/Shop/SpecialChest.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b15c5b3b610c912db8c1355f50b9f3d8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -107,7 +107,7 @@ public class XpPass : MonoBehaviour
|
||||||
DBmanager.SetGems(DBmanager.Gems + reward.amount);
|
DBmanager.SetGems(DBmanager.Gems + reward.amount);
|
||||||
}else if(reward.rewardType == XpRewardType.Chest){
|
}else if(reward.rewardType == XpRewardType.Chest){
|
||||||
// StartCoroutine(destroyTimer(Instantiate(chestPrefab, chestSpawnParent),5));
|
// StartCoroutine(destroyTimer(Instantiate(chestPrefab, chestSpawnParent),5));
|
||||||
ChestOpener.instance.OpenChest();
|
ChestOpener.instance.OpenChest(0,100);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
BIN
Assets/Game/Sprites/Logo-RankV2.png
Normal file
BIN
Assets/Game/Sprites/Logo-RankV2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 159 KiB |
120
Assets/Game/Sprites/Logo-RankV2.png.meta
Normal file
120
Assets/Game/Sprites/Logo-RankV2.png.meta
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0d1a9d421a6c35f4391d8c82675a23a3
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 1024
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 1024
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 1024
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Game/Sprites/Logo-casual.png
Normal file
BIN
Assets/Game/Sprites/Logo-casual.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 343 KiB |
120
Assets/Game/Sprites/Logo-casual.png.meta
Normal file
120
Assets/Game/Sprites/Logo-casual.png.meta
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 988d7450862c2fdfab23f6e1521b16f1
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 1024
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 1024
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 1024
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -17,14 +17,14 @@ MonoBehaviour:
|
||||||
- level: 1
|
- level: 1
|
||||||
stats:
|
stats:
|
||||||
- name: Gold Per H
|
- name: Gold Per H
|
||||||
value: 100
|
value: 50
|
||||||
image: {fileID: 21300000, guid: ffe128a5f047f43d9a494e099634504e, type: 3}
|
image: {fileID: 21300000, guid: ffe128a5f047f43d9a494e099634504e, type: 3}
|
||||||
price: 8500
|
price: 8500
|
||||||
xpGain: 2000
|
xpGain: 2000
|
||||||
- level: 1
|
- level: 1
|
||||||
stats:
|
stats:
|
||||||
- name: Gold Per H
|
- name: Gold Per H
|
||||||
value: +50
|
value: +100
|
||||||
image: {fileID: 21300000, guid: ffe128a5f047f43d9a494e099634504e, type: 3}
|
image: {fileID: 21300000, guid: ffe128a5f047f43d9a494e099634504e, type: 3}
|
||||||
price: 8500
|
price: 8500
|
||||||
xpGain: 2000
|
xpGain: 2000
|
||||||
|
|
@ -39,6 +39,6 @@ MonoBehaviour:
|
||||||
collectable: 1
|
collectable: 1
|
||||||
resourceType: 2
|
resourceType: 2
|
||||||
productinoRates:
|
productinoRates:
|
||||||
- 100
|
- 50
|
||||||
- 150
|
- 150
|
||||||
- 300
|
- 300
|
||||||
|
|
|
||||||
|
|
@ -19,25 +19,25 @@ MonoBehaviour:
|
||||||
skinType: 0
|
skinType: 0
|
||||||
- name: Avg space enjoyer
|
- name: Avg space enjoyer
|
||||||
image: {fileID: 5693378827328238, guid: 4de40472c684c464db6425c3f8b4cb86, type: 3}
|
image: {fileID: 5693378827328238, guid: 4de40472c684c464db6425c3f8b4cb86, type: 3}
|
||||||
price: 0
|
price: 5000
|
||||||
skinType: 0
|
skinType: 0
|
||||||
- name: Rare Prince
|
- name: Rare Prince
|
||||||
image: {fileID: 638681777288463559, guid: d274292b8f4ba6c49a18bae11a1b9893, type: 3}
|
image: {fileID: 638681777288463559, guid: d274292b8f4ba6c49a18bae11a1b9893, type: 3}
|
||||||
price: 150
|
price: 20000
|
||||||
skinType: 1
|
skinType: 1
|
||||||
- name: Rare Viper
|
- name: Rare Viper
|
||||||
image: {fileID: -5759662267452513102, guid: d274292b8f4ba6c49a18bae11a1b9893, type: 3}
|
image: {fileID: -5759662267452513102, guid: d274292b8f4ba6c49a18bae11a1b9893, type: 3}
|
||||||
price: 200
|
price: 20000
|
||||||
skinType: 1
|
skinType: 1
|
||||||
- name: Rare Gold
|
- name: Rare Gold
|
||||||
image: {fileID: 4684224760558976125, guid: d274292b8f4ba6c49a18bae11a1b9893, type: 3}
|
image: {fileID: 4684224760558976125, guid: d274292b8f4ba6c49a18bae11a1b9893, type: 3}
|
||||||
price: 300
|
price: 20000
|
||||||
skinType: 1
|
skinType: 1
|
||||||
- name: Legendary Fish
|
- name: Legendary Fish
|
||||||
image: {fileID: 4684224760558976125, guid: 2c885f2a72d92dd4e96779a685c53911, type: 3}
|
image: {fileID: 4684224760558976125, guid: 2c885f2a72d92dd4e96779a685c53911, type: 3}
|
||||||
price: 500
|
price: 50000
|
||||||
skinType: 2
|
skinType: 2
|
||||||
- name: Legendary Fish Toxic
|
- name: Legendary Fish Toxic
|
||||||
image: {fileID: -891101006492794385, guid: 2c885f2a72d92dd4e96779a685c53911, type: 3}
|
image: {fileID: -891101006492794385, guid: 2c885f2a72d92dd4e96779a685c53911, type: 3}
|
||||||
price: 550
|
price: 50000
|
||||||
skinType: 2
|
skinType: 2
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,22 @@ EditorBuildSettings:
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Game/Scenes/GameScene/GameScene.unity
|
path: Assets/Game/Scenes/GameScene/GameScene.unity
|
||||||
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
||||||
- enabled: 0
|
- enabled: 1
|
||||||
path: Assets/Game/Scenes/Minigame/NoLogin.unity
|
path: Assets/Game/Scenes/Minigame/NoLogin.unity
|
||||||
guid: eea869b23eb94de6c83d5bac8a04358a
|
guid: eea869b23eb94de6c83d5bac8a04358a
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Game/Scenes/Minigame/MinigameMenu.unity
|
path: Assets/Game/Scenes/Minigame/MinigameMenu.unity
|
||||||
guid: 24a7d750806c45aa1a9560044335a825
|
guid: 24a7d750806c45aa1a9560044335a825
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Game/Scenes/Minigame/MinigameMatchmaking.unity
|
||||||
|
guid: 59eddda8397341803b1134237eb697d7
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Game/Scenes/Minigame/Minigame.unity
|
path: Assets/Game/Scenes/Minigame/Minigame.unity
|
||||||
guid: 04c0f75906081f2cda037ccf580ff104
|
guid: 04c0f75906081f2cda037ccf580ff104
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Game/Scenes/GameScene/Maintaince.unity
|
path: Assets/Game/Scenes/GameScene/Maintaince.unity
|
||||||
guid: 0d77b4960213a84b1877a979d4f5e03a
|
guid: 0d77b4960213a84b1877a979d4f5e03a
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Game/Scenes/Minigame/MinigameRanked.unity
|
||||||
|
guid: a9d3dbf520f6a482b8a715db7a293e58
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ PlayerSettings:
|
||||||
targetDevice: 2
|
targetDevice: 2
|
||||||
useOnDemandResources: 0
|
useOnDemandResources: 0
|
||||||
accelerometerFrequency: 60
|
accelerometerFrequency: 60
|
||||||
companyName: DefaultCompany
|
companyName: TWEP
|
||||||
productName: UPF
|
productName: UPF
|
||||||
defaultCursor: {fileID: 0}
|
defaultCursor: {fileID: 0}
|
||||||
cursorHotspot: {x: 0, y: 0}
|
cursorHotspot: {x: 0, y: 0}
|
||||||
|
|
@ -134,7 +134,7 @@ PlayerSettings:
|
||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 0.1
|
bundleVersion: 1
|
||||||
preloadedAssets: []
|
preloadedAssets: []
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
wsaTransparentSwapchain: 0
|
wsaTransparentSwapchain: 0
|
||||||
|
|
@ -153,7 +153,7 @@ PlayerSettings:
|
||||||
androidSupportedAspectRatio: 1
|
androidSupportedAspectRatio: 1
|
||||||
androidMaxAspectRatio: 2.1
|
androidMaxAspectRatio: 2.1
|
||||||
applicationIdentifier:
|
applicationIdentifier:
|
||||||
Android: com.DefaultCompany.UPF
|
Android: com.TWEP.UPF
|
||||||
Standalone: com.DefaultCompany.UPF
|
Standalone: com.DefaultCompany.UPF
|
||||||
buildNumber:
|
buildNumber:
|
||||||
Standalone: 0
|
Standalone: 0
|
||||||
|
|
@ -247,15 +247,15 @@ PlayerSettings:
|
||||||
AndroidTargetDevices: 0
|
AndroidTargetDevices: 0
|
||||||
AndroidSplashScreenScale: 0
|
AndroidSplashScreenScale: 0
|
||||||
androidSplashScreen: {fileID: 0}
|
androidSplashScreen: {fileID: 0}
|
||||||
AndroidKeystoreName:
|
AndroidKeystoreName: /media/RocketSpeed/keys/twep.keystore
|
||||||
AndroidKeyaliasName:
|
AndroidKeyaliasName: tul
|
||||||
AndroidBuildApkPerCpuArchitecture: 0
|
AndroidBuildApkPerCpuArchitecture: 0
|
||||||
AndroidTVCompatibility: 0
|
AndroidTVCompatibility: 0
|
||||||
AndroidIsGame: 1
|
AndroidIsGame: 1
|
||||||
AndroidEnableTango: 0
|
AndroidEnableTango: 0
|
||||||
androidEnableBanner: 1
|
androidEnableBanner: 1
|
||||||
androidUseLowAccuracyLocation: 0
|
androidUseLowAccuracyLocation: 0
|
||||||
androidUseCustomKeystore: 0
|
androidUseCustomKeystore: 1
|
||||||
m_AndroidBanners:
|
m_AndroidBanners:
|
||||||
- width: 320
|
- width: 320
|
||||||
height: 180
|
height: 180
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
BIN
ServerBuild/UPF_Data/Managed/LRM.dll
Normal file
BIN
ServerBuild/UPF_Data/Managed/LRM.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user