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
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
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
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
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
if (Input.GetKeyDown(KeyCode.LeftControl) && (isGrounded () || attached)) | |
{ | |
if (playerFlagPlaced == false || currentBlockType != 10) | |
{ | |
if(!checkFlagRange() && (checkResource() || currentBlockType == 10 || currentBlockType == 1)) | |
{ | |
int px = (int)(playerpos.x + 0.5f); | |
int py = Math.Max ((int)(playerpos.y), (int)WorldManager.minLevelHeight); | |
int pz = (int)(playerpos.z + 0.5f); |
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 placeBlock (float x, float z, float height, int type) | |
{ | |
// Coordinates for the region block - only horizontal elements. | |
Vector3 llbpos = new Vector3 (x, 0.0f, z); | |
LocalLevelBlock llb = findLevelBlock (llbpos); | |
int blockHeight = (int) (height - WorldManager.minLevelHeight); | |
if (llb != null) | |
{ | |
Vector3 regionpos = new Vector3 (x - llb.region.blockCoordX, z - llb.region.blockCoordY, blockHeight); |
NewerOlder