Exemplo n.º 1
0
    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;
        }
    }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
    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;
        }
    }
Exemplo n.º 4
0
 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;
     }
 }