Exemple #1
0
    void Start( )
    {
        Results = new Dictionary<int, int>( );
        if ( photonView.isMine )
        {
            //Attach to hud
            transform.SetParent( TBTDHUDManager.AnyActiveCanvas.transform, false );

            Die = PhotonNetwork.Instantiate( "Die_Six", Vector3.zero, Quaternion.identity, 0 ).GetComponent<Die>( );
            Die.photonView.RequestOwnership( );
            Die.AssignTeam( PhotonNetwork.player.GetTeam( ) );

            //Subscribe to Die event
            Die.OnDieRollLanded += Die_OnDieRollLanded;

            ResetDie( );
        }
    }