Kill feed + Polishings

This commit is contained in:
Sewmina
2022-07-22 00:37:23 +05:30
parent f6bbd21b80
commit 30c5a34e6c
36 changed files with 11072 additions and 17270 deletions

View File

@@ -71,8 +71,8 @@ TrailRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 1
m_Time: 1 m_Time: 2.5
m_Parameters: m_Parameters:
serializedVersion: 3 serializedVersion: 3
widthMultiplier: 1.5 widthMultiplier: 1.5
@@ -81,7 +81,7 @@ TrailRenderer:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: 1 value: 0.666667
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 0 tangentMode: 0
@@ -98,21 +98,21 @@ TrailRenderer:
inWeight: 0.37297413 inWeight: 0.37297413
outWeight: 0.07407034 outWeight: 0.07407034
- serializedVersion: 3 - serializedVersion: 3
time: 0.95363426 time: 1
value: 0 value: 0
inSlope: 0 inSlope: -2.9138165
outSlope: 0 outSlope: -2.9138165
tangentMode: 0 tangentMode: 0
weightedMode: 0 weightedMode: 0
inWeight: 0 inWeight: 0.36073804
outWeight: 0 outWeight: 0
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
colorGradient: colorGradient:
serializedVersion: 2 serializedVersion: 2
key0: {r: 1, g: 0.6725613, b: 0, a: 1} key0: {r: 1, g: 0.20258228, b: 0, a: 1}
key1: {r: 1, g: 0.8624264, b: 0, a: 1} key1: {r: 1, g: 0.6691481, b: 0, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0} key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0} key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0} key4: {r: 0, g: 0, b: 0, a: 0}
@@ -367,6 +367,7 @@ MonoBehaviour:
RotationDetour: {x: 0, y: 0, z: 0, w: 1} RotationDetour: {x: 0, y: 0, z: 0, w: 1}
DetourCorrectionFactor: 0.1 DetourCorrectionFactor: 0.1
showDebugHUD: 1 showDebugHUD: 1
distanceFromCenter: 0
--- !u!114 &5995183602835295541 --- !u!114 &5995183602835295541
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -0,0 +1,95 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1443624906943055284
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1443624906943055291}
- component: {fileID: 1443624906943055289}
- component: {fileID: 1443624906943055290}
- component: {fileID: 1443624906943055288}
m_Layer: 5
m_Name: killfeed_entry
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1443624906943055291
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443624906943055284}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1443624906943055289
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443624906943055284}
m_CullTransparentMesh: 1
--- !u!114 &1443624906943055290
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443624906943055284}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 8a2b9e2a607dd2143b58c44bc32410b4, type: 3}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 1
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Welcome to UPF Minigame 1.0
--- !u!114 &1443624906943055288
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1443624906943055284}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 18b93df2563983a408102065346bccdc, type: 3}
m_Name:
m_EditorClassIdentifier:
txt: {fileID: 1443624906943055290}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a6020e2747c544048928008af9e25f2c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -288,6 +288,7 @@ GameObject:
- component: {fileID: 42724091} - component: {fileID: 42724091}
- component: {fileID: 42724090} - component: {fileID: 42724090}
- component: {fileID: 42724093} - component: {fileID: 42724093}
- component: {fileID: 42724094}
m_Layer: 0 m_Layer: 0
m_Name: NetworkManager m_Name: NetworkManager
m_TagString: Untagged m_TagString: Untagged
@@ -343,7 +344,7 @@ MonoBehaviour:
offlineScene: offlineScene:
onlineScene: onlineScene:
transport: {fileID: 42724090} transport: {fileID: 42724090}
networkAddress: localhost networkAddress: vps.playpoolstudios.com
maxConnections: 100 maxConnections: 100
authenticator: {fileID: 0} authenticator: {fileID: 0}
playerPrefab: {fileID: 5431987895376475548, guid: e811a838f2ebb2f4fb8055331ed295e9, type: 3} playerPrefab: {fileID: 5431987895376475548, guid: e811a838f2ebb2f4fb8055331ed295e9, type: 3}
@@ -373,13 +374,26 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 42724089} m_GameObject: {fileID: 42724089}
m_Enabled: 1 m_Enabled: 0
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6442dc8070ceb41f094e44de0bf87274, type: 3} m_Script: {fileID: 11500000, guid: 6442dc8070ceb41f094e44de0bf87274, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
offsetX: 0 offsetX: 0
offsetY: 0 offsetY: 0
--- !u!114 &42724094
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 42724089}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fa3e9285a9018d093ab853b5f879544f, type: 3}
m_Name:
m_EditorClassIdentifier:
isClient: 1
--- !u!1 &43679075 --- !u!1 &43679075
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -456,6 +470,99 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 43679075} m_GameObject: {fileID: 43679075}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &63498958
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 63498959}
- component: {fileID: 63498961}
- component: {fileID: 63498960}
- component: {fileID: 63498962}
m_Layer: 5
m_Name: KillFeed
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &63498959
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 63498958}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1329330848}
m_Father: {fileID: 2058016609}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -413.2, y: 105.1}
m_SizeDelta: {x: 454.6, y: 193.6}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &63498960
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 63498958}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &63498961
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 63498958}
m_CullTransparentMesh: 1
--- !u!114 &63498962
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 63498958}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 02108f5bf6ebeb244919a7afb3d835f0, type: 3}
m_Name:
m_EditorClassIdentifier:
prefab: {fileID: 1443624906943055284, guid: a6020e2747c544048928008af9e25f2c, type: 3}
entryParent: {fileID: 1329330848}
pool: []
entryAliveTime: 3
--- !u!1 &83788680 --- !u!1 &83788680
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2514,6 +2621,77 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1294043775} m_GameObject: {fileID: 1294043775}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &1329330847
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1329330848}
- component: {fileID: 1329330850}
- component: {fileID: 1329330849}
m_Layer: 5
m_Name: Content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1329330848
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1329330847}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 63498959}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1329330849
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1329330847}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 6
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 1
--- !u!222 &1329330850
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1329330847}
m_CullTransparentMesh: 1
--- !u!1 &1351776592 --- !u!1 &1351776592
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -3063,6 +3241,7 @@ RectTransform:
- {fileID: 508845191} - {fileID: 508845191}
- {fileID: 1083193387} - {fileID: 1083193387}
- {fileID: 2133876931} - {fileID: 2133876931}
- {fileID: 63498959}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: eea869b23eb94de6c83d5bac8a04358a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,15 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
public class AutoConnect : MonoBehaviour
{
public bool isClient;
void Start()
{
if(isClient){
FindObjectOfType<NetworkManager>().StartClient();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fa3e9285a9018d093ab853b5f879544f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,42 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class KillFeedEntry : MonoBehaviour
{
private float AliveTime;
private float _t;
public Text txt;
void Awake(){
if(txt==null){txt = GetComponent<Text>();}
}
// Update is called once per frame
void Update()
{
if(_t < AliveTime){
_t+=Time.deltaTime;
return;
}else if(_t < AliveTime * 2){
_t+=Time.deltaTime;
float p = (_t - AliveTime)/AliveTime;
txt.color = new Color(txt.color.r, txt.color.g, txt.color.b, 1f-p);
}else{
Die();
}
}
public void SetEntry(string text, float aliveTime = 1){
AliveTime=aliveTime;
txt.text = text;
txt.color = new Color(txt.color.r, txt.color.g, txt.color.b, 1);
_t = 0;
gameObject.SetActive(true);
}
public void Die(){
gameObject.SetActive(false);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 18b93df2563983a408102065346bccdc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class KillfeedMgr : MonoBehaviour
{
public static KillfeedMgr instance;
public GameObject prefab;
public Transform entryParent;
public List<KillFeedEntry> pool = new List<KillFeedEntry>();
public float entryAliveTime = 1;
void Awake(){
instance=this;
}
void Start(){
AddNewEntry("Welcome to UPF Minigame 1.2");
}
public void AddNewEntry(string message){
for(int i =0; i < pool.Count; i++){
if(!pool[i].gameObject.activeSelf){
pool[i].SetEntry(message,entryAliveTime);
return;
}
}
//No pooled item found, make new
GameObject newEntry = Instantiate(prefab, entryParent);
pool.Add(newEntry.GetComponent<KillFeedEntry>());
newEntry.GetComponent<KillFeedEntry>().SetEntry(message,entryAliveTime);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 02108f5bf6ebeb244919a7afb3d835f0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,45 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class NoLoginScreen : MonoBehaviour
{
public GameObject loadingScreen;
public string sceneName;
public InputField usernameInput;
public Button goBtn;
void Start()
{
if(!HasUsername()){
loadingScreen.SetActive(false);
}else{
SceneManager.LoadScene(sceneName);
}
goBtn.interactable=false;
usernameInput.onValueChange.AddListener(OnInputChange);
goBtn.onClick.AddListener(LetsGo);
}
void OnInputChange(string newVal){
goBtn.interactable = (usernameInput.text.Length > 2);
}
public void LetsGo(){
PlayerPrefs.SetString("username", usernameInput.text);
loadingScreen.SetActive(true);
SceneManager.LoadScene(sceneName);
}
bool HasUsername(){
if(!PlayerPrefs.HasKey("username")){
return false;
}
if(PlayerPrefs.GetString("username").Length < 1){
return false;
}
return true;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a02d43d20c921c19db88f94d975c8687
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -17,7 +17,7 @@ public class PickupItem : NetworkBehaviour
Collider2D hit = Physics2D.OverlapCircle(transform.position, radius); Collider2D hit = Physics2D.OverlapCircle(transform.position, radius);
if(hit!=null && hit.GetComponent<SpaceshipController>()!=null){ if(hit!=null && hit.GetComponent<SpaceshipController>()!=null){
Debug.Log(hit.GetComponent<SpaceshipController>().pname +$" collected me at {transform.position}"); // Debug.Log(hit.GetComponent<SpaceshipController>().pname +$" collected me at {transform.position}");
hit.GetComponent<SpaceshipController>().CollectPickup(type); hit.GetComponent<SpaceshipController>().CollectPickup(type);
active=false; active=false;
Deactivate(); Deactivate();

View File

@@ -221,13 +221,15 @@ public class SpaceshipController : NetworkBehaviour
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)* 4; double delay = (timeInMillis - sentTime);
int numberOfFrames = (int)((float)(delay) / 20f); int numberOfFrames = (int)((float)(delay/1000f) *50f);
Vector3 newPosition = position;
Quaternion newRotation = rotation; Quaternion newRotation = rotation;
Vector3 direction = (rotation * Vector3.forward).normalized;
Vector3 newPosition = position + ((direction * speed) * numberOfFrames);
for (int i = 0; i < numberOfFrames; i++) for (int i = 0; i < numberOfFrames; i++)
{ {
newPosition += new Vector3(0, speed);
newRotation = Quaternion.Lerp(newRotation, getTurnAngle(input), turningSmoothFactor * input.magnitude); newRotation = Quaternion.Lerp(newRotation, getTurnAngle(input), turningSmoothFactor * input.magnitude);
} }
@@ -311,12 +313,14 @@ 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; double delay = timeInMillis - sentTime;
int numberOfFrames = (int)((float)(delay*2) / 20f); int numberOfFrames = (int)((float)(delay/1000f) * 50f);
Vector3 newPosition = position;
Quaternion newRotation = rotation; Quaternion newRotation = rotation;
Vector3 direction = (rotation * Vector3.forward).normalized;
Vector3 newPosition = position + ((direction * speed) * numberOfFrames);
for (int i = 0; i < numberOfFrames; i++) for (int i = 0; i < numberOfFrames; i++)
{ {
newPosition += new Vector3(0, speed);
newRotation = Quaternion.Lerp(newRotation, getTurnAngle(input), turningSmoothFactor * input.magnitude); newRotation = Quaternion.Lerp(newRotation, getTurnAngle(input), turningSmoothFactor * input.magnitude);
} }
int distanceSinceSent = (int)Vector3.Distance(newPosition, position); int distanceSinceSent = (int)Vector3.Distance(newPosition, position);
@@ -456,6 +460,7 @@ public class SpaceshipController : NetworkBehaviour
[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>");
gameObject.SetActive(false); gameObject.SetActive(false);
if(isLocalPlayer){ if(isLocalPlayer){
//TODO: Death message goes here //TODO: Death message goes here

View File

@@ -17,6 +17,7 @@ public class TrailMgr : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update(){ void Update(){
#if PLATFORM_ANDROID
positions = new Vector3[trail.positionCount]; positions = new Vector3[trail.positionCount];
int length = trail.GetPositions(positions); int length = trail.GetPositions(positions);
if(length > trailsPool.Count){ if(length > trailsPool.Count){
@@ -37,6 +38,7 @@ public class TrailMgr : MonoBehaviour
trailsPool[i].SetActive(false); trailsPool[i].SetActive(false);
} }
} }
#endif
} }

File diff suppressed because it is too large Load Diff

3045
Assets/Warlock.log Normal file

File diff suppressed because it is too large Load Diff

7
Assets/Warlock.log.meta Normal file
View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9651497846d9ebf4388a829d702d7376
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

3067
Assets/WarlockMobile.log Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,9 @@ EditorBuildSettings:
- enabled: 0 - enabled: 0
path: Assets/Game/Scenes/GameScene/GameScene.unity path: Assets/Game/Scenes/GameScene/GameScene.unity
guid: 9fc0d4010bbf28b4594072e72b8655ab guid: 9fc0d4010bbf28b4594072e72b8655ab
- enabled: 1
path: Assets/Game/Scenes/Minigame/NoLogin.unity
guid: eea869b23eb94de6c83d5bac8a04358a
- enabled: 1 - enabled: 1
path: Assets/Game/Scenes/Minigame/Minigame.unity path: Assets/Game/Scenes/Minigame/Minigame.unity
guid: 04c0f75906081f2cda037ccf580ff104 guid: 04c0f75906081f2cda037ccf580ff104

View File

@@ -690,7 +690,7 @@ PlayerSettings:
webGLDecompressionFallback: 0 webGLDecompressionFallback: 0
scriptingDefineSymbols: scriptingDefineSymbols:
1: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER;MIRROR_37_0_OR_NEWER;MIRROR_38_0_OR_NEWER;MIRROR_39_0_OR_NEWER;MIRROR_40_0_OR_NEWER;MIRROR_41_0_OR_NEWER;MIRROR_42_0_OR_NEWER;MIRROR_43_0_OR_NEWER;MIRROR_44_0_OR_NEWER;MIRROR_46_0_OR_NEWER;MIRROR_47_0_OR_NEWER;MIRROR_53_0_OR_NEWER;MIRROR_55_0_OR_NEWER;MIRROR_57_0_OR_NEWER;MIRROR_58_0_OR_NEWER;MIRROR_65_0_OR_NEWER;MIRROR_66_0_OR_NEWER 1: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER;MIRROR_37_0_OR_NEWER;MIRROR_38_0_OR_NEWER;MIRROR_39_0_OR_NEWER;MIRROR_40_0_OR_NEWER;MIRROR_41_0_OR_NEWER;MIRROR_42_0_OR_NEWER;MIRROR_43_0_OR_NEWER;MIRROR_44_0_OR_NEWER;MIRROR_46_0_OR_NEWER;MIRROR_47_0_OR_NEWER;MIRROR_53_0_OR_NEWER;MIRROR_55_0_OR_NEWER;MIRROR_57_0_OR_NEWER;MIRROR_58_0_OR_NEWER;MIRROR_65_0_OR_NEWER;MIRROR_66_0_OR_NEWER
7: ENABLE_UNITYMESHSIMPLIFIER 7: ENABLE_UNITYMESHSIMPLIFIER;MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER;MIRROR_37_0_OR_NEWER;MIRROR_38_0_OR_NEWER;MIRROR_39_0_OR_NEWER;MIRROR_40_0_OR_NEWER;MIRROR_41_0_OR_NEWER;MIRROR_42_0_OR_NEWER;MIRROR_43_0_OR_NEWER;MIRROR_44_0_OR_NEWER;MIRROR_46_0_OR_NEWER;MIRROR_47_0_OR_NEWER;MIRROR_53_0_OR_NEWER;MIRROR_55_0_OR_NEWER;MIRROR_57_0_OR_NEWER;MIRROR_58_0_OR_NEWER;MIRROR_65_0_OR_NEWER;MIRROR_66_0_OR_NEWER
additionalCompilerArguments: {} additionalCompilerArguments: {}
platformArchitecture: {} platformArchitecture: {}
scriptingBackend: {} scriptingBackend: {}

Binary file not shown.

90
upf.sln
View File

@@ -1,63 +1,75 @@
Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # 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 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 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 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 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 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 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 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 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 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 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 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 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 EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{d2fa7125-b336-b292-eceb-bf1e731b3f48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {f8f3d981-3ac9-a8b7-ea43-2868619efe2a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{d2fa7125-b336-b292-eceb-bf1e731b3f48}.Debug|Any CPU.Build.0 = Debug|Any CPU {f8f3d981-3ac9-a8b7-ea43-2868619efe2a}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5c2c6f8b-afbb-9cd0-d973-6efba6c32d6d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {f4ef7e8d-99b4-a202-8a27-32dcfce49cfe}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5c2c6f8b-afbb-9cd0-d973-6efba6c32d6d}.Debug|Any CPU.Build.0 = Debug|Any CPU {f4ef7e8d-99b4-a202-8a27-32dcfce49cfe}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8c789ebf-5061-692d-09a2-395c3f960186}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6f1ac7da-277d-ee44-8547-e218c93f84df}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8c789ebf-5061-692d-09a2-395c3f960186}.Debug|Any CPU.Build.0 = Debug|Any CPU {6f1ac7da-277d-ee44-8547-e218c93f84df}.Debug|Any CPU.Build.0 = Debug|Any CPU
{bd29b6d7-a588-6db2-c4b4-0c3e7050329f}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {d9448b0f-e456-cf8f-8285-980f3496df94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{bd29b6d7-a588-6db2-c4b4-0c3e7050329f}.Debug|Any CPU.Build.0 = Debug|Any CPU {d9448b0f-e456-cf8f-8285-980f3496df94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92ca8eda-4591-6ba7-62fe-23737b4dad83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {b99ffb8c-f6f2-f646-802e-7cb2e62d8c0c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92ca8eda-4591-6ba7-62fe-23737b4dad83}.Debug|Any CPU.Build.0 = Debug|Any CPU {b99ffb8c-f6f2-f646-802e-7cb2e62d8c0c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{c8f5758f-6f4d-6ca3-8672-ff5589388f80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0203a8e7-6255-7e0b-3cbf-ecae2398312c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{c8f5758f-6f4d-6ca3-8672-ff5589388f80}.Debug|Any CPU.Build.0 = Debug|Any CPU {0203a8e7-6255-7e0b-3cbf-ecae2398312c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{a36d2e59-4ac3-f799-3987-fc2485d79e1a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8c94d811-7988-2ebf-1cc0-26b574688e67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{a36d2e59-4ac3-f799-3987-fc2485d79e1a}.Debug|Any CPU.Build.0 = Debug|Any CPU {8c94d811-7988-2ebf-1cc0-26b574688e67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ebda325d-e86f-a93b-6742-1169bded4621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {cf7f2fab-d83d-f366-f3b2-9d9e4eddc3cc}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ebda325d-e86f-a93b-6742-1169bded4621}.Debug|Any CPU.Build.0 = Debug|Any CPU {cf7f2fab-d83d-f366-f3b2-9d9e4eddc3cc}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3eef3b8e-d897-623d-b9c7-d540c823b9a8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {e020c22e-60bb-7a19-f116-ef587d3ae77f}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3eef3b8e-d897-623d-b9c7-d540c823b9a8}.Debug|Any CPU.Build.0 = Debug|Any CPU {e020c22e-60bb-7a19-f116-ef587d3ae77f}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11a3099b-b691-e713-f90d-1e4ea21c7a4c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {520da678-0ed5-7053-5e7f-1a7e3c90b70a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11a3099b-b691-e713-f90d-1e4ea21c7a4c}.Debug|Any CPU.Build.0 = Debug|Any CPU {520da678-0ed5-7053-5e7f-1a7e3c90b70a}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2c2a6066-189f-5a3f-0f94-acebe3ed3a33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {58b849ad-b7ea-e401-5c5b-0056f4cec462}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2c2a6066-189f-5a3f-0f94-acebe3ed3a33}.Debug|Any CPU.Build.0 = Debug|Any CPU {58b849ad-b7ea-e401-5c5b-0056f4cec462}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0568cbc7-4b38-de37-2cfc-efd6fc69d0df}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74cb33d9-aafa-4b6f-1603-b7b7c41edd4c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0568cbc7-4b38-de37-2cfc-efd6fc69d0df}.Debug|Any CPU.Build.0 = Debug|Any CPU {74cb33d9-aafa-4b6f-1603-b7b7c41edd4c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{f12b632e-c0f2-40d4-ee68-81bde8ff4e6e}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {e1d3e786-6173-5f3a-7812-807511d3f547}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{f12b632e-c0f2-40d4-ee68-81bde8ff4e6e}.Debug|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE