예제 #1
0
    public override void OnStartClient(){
        base.OnStartClient();
        Debug.Log("DictID is " + dictId);
        nIdentity = GetComponent<NetworkIdentity>();
        nm = (PlanetsNetworkManager)NetworkManager.singleton;
        ppi = PersonalPlayerInfo.singleton;
        pm = PlayerManager.singleton;
        rb = GetComponent<Rigidbody>();
        invertControls = nm.isSplitScreen();
        reflectionMatrix = genRefMatrix(90 * Mathf.Deg2Rad);
        roundEvents = GameObject.Find("RoundEvents").GetComponent<RoundEvents>(); //Sets reference to RoundEvents object
        resourcePowerUpManager = GameObject.FindGameObjectWithTag("Planet").GetComponent<ResourcePowerUpManager>();
        needsReflection = gameObject.CompareTag("PlayerSuperCorp");
        //Debug.Log("Player + " + PlayerManager.singleton.getPlayer(dictId));

            if (pm.checkIfExists(dictId)) {
            playerDetails.setPlayerDetails(dictId, pm.getPlayer(dictId));
        } else {
            playerDetails.setPlayerDetails(dictId, ppi.getPlayer());
        }
        Debug.Log("Setting teardrop id to " + playerDetails.getObsId().ToString()); //BUG
        tearDropId.text = playerDetails.getObsId().ToString();
    }