Fixed NetworkTransforms and Added Host IP

- Fixed placement of NetworkTransform on Prefab - Needs to be on the
  same level as the character controller and movement
- Added a display of the host IP address in the lobby
This commit is contained in:
2021-11-03 14:03:43 -05:00
parent a47550e85b
commit 2953687180
14 changed files with 252 additions and 466 deletions

View File

@@ -1,10 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using MLAPI;
using UnityEngine;
public class Blink : MonoBehaviour{
public class Blink : NetworkBehaviour {
// Start is called before the first frame update
@@ -42,6 +43,8 @@ public class Blink : MonoBehaviour{
//blinks the player forwards
private void BlinkMove()
{
if (!IsLocalPlayer) { return; }
if (Input.GetMouseButton(1))
{
// Finding the origin and end point of laser.

View File

@@ -1,9 +1,10 @@
using System.Collections;
using System.Collections.Generic;
using MLAPI;
using UnityEngine;
public class Dash : MonoBehaviour{
public class Dash : NetworkBehaviour {
public Vector3 moveDirection;
public const float maxDashTime = 1.0f;
@@ -20,6 +21,8 @@ public class Dash : MonoBehaviour{
//UPDATE CHECK FOR MOVEMENT ONLY WHEN DASHING
void FixedUpdate(){
if (!IsLocalPlayer) { return; }
if (Input.GetKeyDown(KeyCode.E))
{
currentDashTime = 0;

View File

@@ -1,9 +1,10 @@
using UnityEngine;
using System.Linq;
using MLAPI;
using UnityEngine.Rendering;
[RequireComponent (typeof(PlayerMovement))]
public class WallRun : MonoBehaviour
public class WallRun : NetworkBehaviour
{
public float wallMaxDistance = 1;
@@ -67,6 +68,8 @@ public class WallRun : MonoBehaviour
public void WallRunRoutine()
{
if (!IsLocalPlayer) { return; }
isWallRunning = false;
if(playerMovementController.GetJumpPressed())