void Start() { blockInv = new SortedDictionary <byte, int>(); _mesh = transform.FindChild("Mesh").gameObject; _nameTag = transform.FindChild("NameTag").gameObject.GetComponent <TextMesh>(); _playerTerrainModify = GetComponent <PlayerTerrainModify>(); _playerWeapon = GetComponent <PlayerWeapon>(); activeHandItem = ActiveHandItem.Pickaxe; _networkManager = GameObject.Find("_Scripts").GetComponent <NetworkManager>(); if (isBluTeam) { transform.position = World.BluTeamRespawnPoint; } else { transform.position = World.RedTeamRespawnPoint; } }
private void CheckHandItemSwitch() { if (Input.GetKeyUp(KeyCode.Alpha1)) { activeHandItem = ActiveHandItem.Weapon; } else if (Input.GetKeyUp(KeyCode.Alpha2)) { activeHandItem = ActiveHandItem.Pickaxe; } else if (Input.GetKeyUp(KeyCode.Alpha3)) { activeHandItem = ActiveHandItem.Slot1; } else if (Input.GetKeyUp(KeyCode.Alpha4)) { activeHandItem = ActiveHandItem.Slot2; } else if (Input.GetKeyUp(KeyCode.Alpha5)) { activeHandItem = ActiveHandItem.Slot3; } }
void Start() { blockInv = new SortedDictionary<byte, int>(); _mesh = transform.FindChild("Mesh").gameObject; _nameTag = transform.FindChild("NameTag").gameObject.GetComponent<TextMesh>(); _playerTerrainModify = GetComponent<PlayerTerrainModify>(); _playerWeapon = GetComponent<PlayerWeapon>(); activeHandItem = ActiveHandItem.Pickaxe; _networkManager = GameObject.Find("_Scripts").GetComponent<NetworkManager>(); if (isBluTeam) { transform.position = World.BluTeamRespawnPoint; } else { transform.position = World.RedTeamRespawnPoint; } }