mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2026-07-31 07:29:02 +02:00
added NetworkManager compontent
This commit is contained in:
@@ -11,11 +11,19 @@ public class DebugCanvas : MonoBehaviour
|
||||
public float deltaTime;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
DebugTextGrounded.text = "isGrounded: " + Player.GetComponent<PlayerController>().isGrounded.ToString();
|
||||
{/*
|
||||
if(Player == null)
|
||||
{
|
||||
Player = GameObject.FindGameObjectWithTag("Player").gameObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugTextGrounded.text = "isGrounded: " + Player.GetComponent<PlayerController>().isGrounded.ToString();
|
||||
|
||||
deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
|
||||
float fps = 1.0f / deltaTime;
|
||||
fpsText.text = Mathf.Ceil(fps).ToString() + "FPS";
|
||||
deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
|
||||
float fps = 1.0f / deltaTime;
|
||||
fpsText.text = Mathf.Ceil(fps).ToString() + "FPS";
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
8
Assets/Scripts/GameManager/Networking.cs
Normal file
8
Assets/Scripts/GameManager/Networking.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using MLAPI;
|
||||
public class Networking : NetworkManager
|
||||
{
|
||||
|
||||
}
|
||||
11
Assets/Scripts/GameManager/Networking.cs.meta
Normal file
11
Assets/Scripts/GameManager/Networking.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f54db2e39d506634a9373c6d52305187
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -12,8 +12,10 @@ public class Player : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
GameManager = GameObject.Find("GameManager");
|
||||
playerMaster = GameManager.GetComponent<PlayerMaster>();
|
||||
InvokeRepeating("Sync", 3.0f, SyncIntervalSeconds);
|
||||
|
||||
//InvokeRepeating("Sync", 3.0f, SyncIntervalSeconds);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user