Exemplo n.º 1
0
 // Token: 0x0600069A RID: 1690 RVA: 0x00024D3C File Offset: 0x00022F3C
 public void SyncValues(GhostTraits traits)
 {
     this.view.RPC("SyncValuesNetworked", PhotonTargets.AllBuffered, new object[]
     {
         (int)traits.ghostType,
         this.ghostTraits.ghostAge,
         this.ghostTraits.isMale,
         this.ghostTraits.ghostName,
         this.ghostTraits.isShy,
         this.ghostTraits.deathLength,
         this.ghostTraits.favouriteRoomID
     });
 }
Exemplo n.º 2
0
    private void SyncValuesNetworked(int ghostType, int ghostAge, bool isMale, string ghostName, bool isShy, int deathLength, int favouriteRoomID)
    {
        GhostTraits ghostTraits = new GhostTraits
        {
            ghostType       = (GhostTraits.Type)ghostType,
            ghostAge        = ghostAge,
            isMale          = isMale,
            ghostName       = ghostName,
            isShy           = isShy,
            deathLength     = deathLength,
            favouriteRoomID = favouriteRoomID
        };

        FileBasedPrefs.SetString("GhostType", LocalisationSystem.GetLocalisedValue("Journal_" + (GhostTraits.Type)ghostType + "Title"));
        this.ghostTraits   = ghostTraits;
        this.favouriteRoom = LevelController.instance.rooms[ghostTraits.favouriteRoomID];
        LevelController.instance.currentGhost = this.ghost;
        GameController.instance.OnGhostSpawned.Invoke();
        if (PhotonNetwork.isMasterClient)
        {
            EvidenceController.instance.SpawnAllGhostTypeEvidence(ghostTraits.ghostType);
        }
    }