Example #1
0
 void Awake()
 {
     instance = this;
 }
Example #2
0
    private void Update()
    {
        if (!isLocalPlayer)
        {
            return;
        }


        //_currentTime += Time.deltaTime;
        //if(_currentTime >= _timeToReloadData)
        //{
        //    CmdUpdateDataGold(this.data.Ressource.Golds);
        //    CmdSendLife(this.data.Boat.Stats.Life);
        //    _currentTime = 0;
        //}


        if (!_asBoatSpawned && isLocalPlayer)
        {
            if (SceneManager.GetActiveScene().name == "Game")
            {
                // Debug.Log("IN SPAWN BOAT");
                _asBoatSpawned = true;
                CmdSpawnBoat();
                //TEST SEB
                _myhUD = FindObjectOfType <HUD_Script>();
                _myhUD.SetPlayerReference(this.gameObject);
                //END TEST
                myIle = FindObjectOfType <Ile>();
            }
        }

        if (_isConnected == true && isLocalPlayer)
        {
            _isConnected = false;
            CmdLoadDataLogin();
        }
        if (_isEnteringGame == true && isLocalPlayer)
        {
            _isEnteringGame = false;
            CmdLoadDataEnterOnGame();
        }

        if (Input.GetKeyDown(KeyCode.A))
        {
            //Debug.Log("Client | Identifiant : " + _data._identifiant + "  Password : "******"quete id : " + data_dock.Pnj.Quete.ID);
            Debug.Log("quete nb voulu : " + data_dock.Pnj.Quete.ItemCountNeeded);
            data_quest            = data_dock.Pnj.Quete;
            data_quest.IsAccepted = true;
            data_quest.ID         = 6;
        }
    }
Example #3
0
	void Awake()
	{
		instance = this;
	}