mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-09 02:45:17 -05:00
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:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user