This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(Input.GetKey(KeyCode.E) && playerFlagPlaced == true) | |
{ | |
/*if(Physics.Raycast(ray, out hit, 50)) | |
{ | |
pickup = true; | |
} | |
} | |
else | |
{ | |
pickup = false;*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Change the currentBlockType | |
if (Input.GetKey (KeyCode.Alpha1)) | |
{ | |
currentBlockType = 1; | |
} | |
if (Input.GetKey (KeyCode.Alpha2)) | |
{ | |
currentBlockType = 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Current block type selected by the player to be placed. | |
int currentBlockType = 1; | |
/// Is the player flag placed in the world. | |
public bool playerFlagPlaced = false; | |
bool inTrigger = false; | |
GameObject flagShortest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool inTrigger; | |
private string ResourceName; | |
private Vector3 ResourcePosition; | |
PlayerMove pmove; | |
//GameObject playerObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Start () { | |
emoteDisplayer = new EmoteDisplayClass(); | |
} | |
public void displayEmote(int emoteType, NetworkInstanceId netId) | |
{ | |
emoteDisplayer.displayEmote (emoteType, netId); | |
} | |
public class EmoteDisplayClass : ScriptableObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool setUIToFalse = true; | |
public void SetUIOpenTrue() | |
{ | |
UIOpen = true; | |
} | |
public void SetUIOpenFalse() | |
{ | |
UIOpen = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.Networking; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
public class PlayerAnimator : NetworkBehaviour { | |
public Animator anim; | |
public float speed = 2.0f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(menuon == true) | |
{ | |
setUIToFalse = false; | |
PCamera = this.transform.parent.gameObject; | |
netIDC = PCamera.GetComponent<NetworkIdentity>().netId; | |
PCamera = ClientScene.FindLocalObject(netIDC); | |
pmove = PCamera.GetComponent<PlayerMove>(); | |
pmove.SetUIOpenTrue(); | |
} | |
else if (setUIToFalse == false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ButtonAction() | |
{ | |
buttons[CurMenuItem].sceneimage.color = buttons[CurMenuItem].PressedColor; | |
GameObject Player = this.transform.parent.gameObject; | |
NetworkInstanceId netID = Player.GetComponent<NetworkIdentity>().netId; | |
Debug.Log ("Sending emote with networkID: " + netID.ToString()); | |
Vector3 offset = new Vector3(0.0f, 2.5f, 0.0f); | |
//IconObject DisplayEmote; | |
if (CurMenuItem == 0) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NetworkClient.allClients[0].RegisterHandler (LevelMsgType.EmoteSingleSender, ServerCommandHandler); // Handle incoming emotes from server | |
NetworkClient.allClients[0].RegisterHandler (LevelMsgType.PlayerFlagRequest, ServerCommandHandler); | |
case LevelMsgType.EmoteSingleSender: | |
/// Handle incoming emotes from server | |
{ | |
SendEmoteMessageAndClientID m = netMsg.ReadMessage<SendEmoteMessageAndClientID> (); | |
displayEmote(m.emoteType, m.netId); | |
Debug.Log ("Incoming emote to client from server from network id: " + m.netId); | |
} |
NewerOlder