Trail growth

This commit is contained in:
Sewmina 2022-06-30 03:18:02 +05:30
parent 253710d137
commit f18f2562eb
14 changed files with 7159 additions and 7158 deletions

File diff suppressed because it is too large Load Diff

View File

@ -233,7 +233,7 @@ MonoBehaviour:
offlineScene:
onlineScene:
transport: {fileID: 42724090}
networkAddress: localhost
networkAddress: vps.playpoolstudios.com
maxConnections: 100
authenticator: {fileID: 0}
playerPrefab: {fileID: 5431987895376475548, guid: e811a838f2ebb2f4fb8055331ed295e9, type: 3}

View File

@ -10,7 +10,7 @@ using System.Net;
using System.Net.Sockets;
public class DBmanager : MonoBehaviour
{
public static string phpRoot = "http://38.242.232.13/upf/";
public static string phpRoot = "http://vps.playpoolstudios.com/upf/";
public static string username = null;
@ -497,7 +497,8 @@ public class DBmanager : MonoBehaviour
public async static void AddInventoryItem(InventoryItem item)
{
bool exists = false;
if(inventory==null){inventory = new List<InventoryEntry>();}
foreach(InventoryEntry entry in inventory){
if(entry.Item == item.itemName){
entry.Count++;

View File

@ -64,7 +64,7 @@ public class LoginManager : MonoBehaviour
MessageDialogInstance.messageDialog.ShowDialog("Error", "Please use a Strong password (should be more than 5 characters)");
return;
}
Debug.Log("Clicked register");
StartCoroutine(Register());
}
@ -113,7 +113,7 @@ public class LoginManager : MonoBehaviour
WWWForm form = new WWWForm();
form.AddField("name", reg_username.text);
form.AddField("password", reg_password.text);
Debug.Log("Registering");
WWW www = new WWW(DBmanager.phpRoot + "register.php", form);
yield return www;
if (www.text == "0")

View File

@ -10,6 +10,9 @@ public class SpaceshipController : NetworkBehaviour
public string pname;
[SyncVar(hook=nameof(OnScoresChanged))]
public int Scores;
[SyncVar(hook=nameof(OnTrailTimeChanged))]
public float trailTime;
public float trailIncrementRate = 0.5f;
[SyncVar]
public bool dead;
public Text pnameTxt;
@ -42,6 +45,10 @@ public class SpaceshipController : NetworkBehaviour
Debug.Log($"Add scores { newScores - oldScores}, (total: {newScores})");
}
void OnTrailTimeChanged(float oldValue, float newValue){
trailMgr.trail.time = newValue;
}
void Start()
{
if (isLocalPlayer)
@ -71,6 +78,7 @@ public class SpaceshipController : NetworkBehaviour
int lastClientUpdateTime = 0;
void FixedUpdate()
{
pnameTxt.rectTransform.rotation = Quaternion.Euler(Vector3.zero);
if(dead){return;}
if (isLocalPlayer)
@ -330,14 +338,18 @@ public class SpaceshipController : NetworkBehaviour
Debug.Log($"{pname} killed {deadPlayer.pname}");
Scores+= 10; //TODO: Need to change Scores on kills?
trailTime = trailMgr.trail.time+ trailIncrementRate;
trailMgr.trail.time = trailTime;
}
}
public void Die(string killer){
Debug.Log("You got killed by " + killer);
Debug.Log($"Sending death signal to {pname} by {killer}");
//Handle Respawning
dead=true;
trailTime = 1;
trailMgr.trail.time = trailTime;
RpcDie(killer);
FindObjectOfType<MinigameManager>().SetRespawn(gameObject);
}

View File

@ -111,7 +111,7 @@ public class WorldItemSelector : MonoBehaviour
if(pointerDiff < moveThreshold){
SelectScreenPoint(ped.position);
}else{
Debug.Log("Pointer moved (" + pointerDiff+ "), Not gonna select item");
// Debug.Log("Pointer moved (" + pointerDiff+ "), Not gonna select item");
}
startedPos = null;
holdingPointer=false;

Binary file not shown.

90
upf.sln
View File

@ -1,63 +1,75 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{d2fa7125-b336-b292-eceb-bf1e731b3f48}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{f8f3d981-3ac9-a8b7-ea43-2868619efe2a}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleWebTransport", "SimpleWebTransport.csproj", "{5c2c6f8b-afbb-9cd0-d973-6efba6c32d6d}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleWebTransport", "SimpleWebTransport.csproj", "{f4ef7e8d-99b4-a202-8a27-32dcfce49cfe}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror", "Mirror.csproj", "{8c789ebf-5061-692d-09a2-395c3f960186}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Examples", "Mirror.Examples.csproj", "{6f1ac7da-277d-ee44-8547-e218c93f84df}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Examples", "Mirror.Examples.csproj", "{bd29b6d7-a588-6db2-c4b4-0c3e7050329f}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror", "Mirror.csproj", "{d9448b0f-e456-cf8f-8285-980f3496df94}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Components", "Mirror.Components.csproj", "{92ca8eda-4591-6ba7-62fe-23737b4dad83}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Whinarn.UnityMeshSimplifier.Runtime", "Whinarn.UnityMeshSimplifier.Runtime.csproj", "{b99ffb8c-f6f2-f646-802e-7cb2e62d8c0c}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "kcp2k", "kcp2k.csproj", "{c8f5758f-6f4d-6ca3-8672-ff5589388f80}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Components", "Mirror.Components.csproj", "{0203a8e7-6255-7e0b-3cbf-ecae2398312c}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Telepathy", "Telepathy.csproj", "{a36d2e59-4ac3-f799-3987-fc2485d79e1a}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Telepathy", "Telepathy.csproj", "{8c94d811-7988-2ebf-1cc0-26b574688e67}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "where-allocations", "where-allocations.csproj", "{ebda325d-e86f-a93b-6742-1169bded4621}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "kcp2k", "kcp2k.csproj", "{cf7f2fab-d83d-f366-f3b2-9d9e4eddc3cc}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Authenticators", "Mirror.Authenticators.csproj", "{3eef3b8e-d897-623d-b9c7-d540c823b9a8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "where-allocations", "where-allocations.csproj", "{e020c22e-60bb-7a19-f116-ef587d3ae77f}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{11a3099b-b691-e713-f90d-1e4ea21c7a4c}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Authenticators", "Mirror.Authenticators.csproj", "{520da678-0ed5-7053-5e7f-1a7e3c90b70a}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Editor", "Mirror.Editor.csproj", "{2c2a6066-189f-5a3f-0f94-acebe3ed3a33}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Mirror.CodeGen", "Unity.Mirror.CodeGen.csproj", "{58b849ad-b7ea-e401-5c5b-0056f4cec462}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Mirror.CodeGen", "Unity.Mirror.CodeGen.csproj", "{0568cbc7-4b38-de37-2cfc-efd6fc69d0df}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.Editor", "Mirror.Editor.csproj", "{74cb33d9-aafa-4b6f-1603-b7b7c41edd4c}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.CompilerSymbols", "Mirror.CompilerSymbols.csproj", "{f12b632e-c0f2-40d4-ee68-81bde8ff4e6e}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mirror.CompilerSymbols", "Mirror.CompilerSymbols.csproj", "{e1d3e786-6173-5f3a-7812-807511d3f547}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.com.consulo.ide.Editor", "Unity.com.consulo.ide.Editor.csproj", "{f3918ae7-b834-5fa8-e000-01833c449c8e}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{20764e99-32a2-613b-c7bd-2b420a48759f}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Whinarn.UnityMeshSimplifier.Editor", "Whinarn.UnityMeshSimplifier.Editor.csproj", "{9c3e4793-780d-e333-1ec5-d5e17feec6f2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{d2fa7125-b336-b292-eceb-bf1e731b3f48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{d2fa7125-b336-b292-eceb-bf1e731b3f48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5c2c6f8b-afbb-9cd0-d973-6efba6c32d6d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5c2c6f8b-afbb-9cd0-d973-6efba6c32d6d}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8c789ebf-5061-692d-09a2-395c3f960186}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8c789ebf-5061-692d-09a2-395c3f960186}.Debug|Any CPU.Build.0 = Debug|Any CPU
{bd29b6d7-a588-6db2-c4b4-0c3e7050329f}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{bd29b6d7-a588-6db2-c4b4-0c3e7050329f}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92ca8eda-4591-6ba7-62fe-23737b4dad83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92ca8eda-4591-6ba7-62fe-23737b4dad83}.Debug|Any CPU.Build.0 = Debug|Any CPU
{c8f5758f-6f4d-6ca3-8672-ff5589388f80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{c8f5758f-6f4d-6ca3-8672-ff5589388f80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{a36d2e59-4ac3-f799-3987-fc2485d79e1a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{a36d2e59-4ac3-f799-3987-fc2485d79e1a}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ebda325d-e86f-a93b-6742-1169bded4621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ebda325d-e86f-a93b-6742-1169bded4621}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3eef3b8e-d897-623d-b9c7-d540c823b9a8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3eef3b8e-d897-623d-b9c7-d540c823b9a8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11a3099b-b691-e713-f90d-1e4ea21c7a4c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11a3099b-b691-e713-f90d-1e4ea21c7a4c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2c2a6066-189f-5a3f-0f94-acebe3ed3a33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2c2a6066-189f-5a3f-0f94-acebe3ed3a33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0568cbc7-4b38-de37-2cfc-efd6fc69d0df}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0568cbc7-4b38-de37-2cfc-efd6fc69d0df}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f12b632e-c0f2-40d4-ee68-81bde8ff4e6e}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f12b632e-c0f2-40d4-ee68-81bde8ff4e6e}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f8f3d981-3ac9-a8b7-ea43-2868619efe2a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f8f3d981-3ac9-a8b7-ea43-2868619efe2a}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f4ef7e8d-99b4-a202-8a27-32dcfce49cfe}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f4ef7e8d-99b4-a202-8a27-32dcfce49cfe}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6f1ac7da-277d-ee44-8547-e218c93f84df}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6f1ac7da-277d-ee44-8547-e218c93f84df}.Debug|Any CPU.Build.0 = Debug|Any CPU
{d9448b0f-e456-cf8f-8285-980f3496df94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{d9448b0f-e456-cf8f-8285-980f3496df94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{b99ffb8c-f6f2-f646-802e-7cb2e62d8c0c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{b99ffb8c-f6f2-f646-802e-7cb2e62d8c0c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0203a8e7-6255-7e0b-3cbf-ecae2398312c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0203a8e7-6255-7e0b-3cbf-ecae2398312c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8c94d811-7988-2ebf-1cc0-26b574688e67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8c94d811-7988-2ebf-1cc0-26b574688e67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{cf7f2fab-d83d-f366-f3b2-9d9e4eddc3cc}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{cf7f2fab-d83d-f366-f3b2-9d9e4eddc3cc}.Debug|Any CPU.Build.0 = Debug|Any CPU
{e020c22e-60bb-7a19-f116-ef587d3ae77f}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{e020c22e-60bb-7a19-f116-ef587d3ae77f}.Debug|Any CPU.Build.0 = Debug|Any CPU
{520da678-0ed5-7053-5e7f-1a7e3c90b70a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{520da678-0ed5-7053-5e7f-1a7e3c90b70a}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58b849ad-b7ea-e401-5c5b-0056f4cec462}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58b849ad-b7ea-e401-5c5b-0056f4cec462}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74cb33d9-aafa-4b6f-1603-b7b7c41edd4c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74cb33d9-aafa-4b6f-1603-b7b7c41edd4c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{e1d3e786-6173-5f3a-7812-807511d3f547}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{e1d3e786-6173-5f3a-7812-807511d3f547}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f3918ae7-b834-5fa8-e000-01833c449c8e}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f3918ae7-b834-5fa8-e000-01833c449c8e}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20764e99-32a2-613b-c7bd-2b420a48759f}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20764e99-32a2-613b-c7bd-2b420a48759f}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9c3e4793-780d-e333-1ec5-d5e17feec6f2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9c3e4793-780d-e333-1ec5-d5e17feec6f2}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE