public void Setup(PlayerCharacterPrivateState privateState) { TechGroupsChanged = null; TechNodesChanged = null; this.technologies = privateState.Technologies; this.techGroups = this.technologies.Groups; this.techNodes = this.technologies.Nodes; this.technologies.ClientSubscribe( _ => _.LearningPoints, _ => LearningPointsChanged?.Invoke(), this); this.techGroups.ClientAnyModification += this.TechGroupsClientAnyModificationHandler; this.techNodes.ClientAnyModification += this.TechNodesClientAnyModificationHandler; instance = this; CurrentTechnologiesChanged?.Invoke(); TechGroupsChanged?.Invoke(); TechNodesChanged?.Invoke(); LearningPointsChanged?.Invoke(); }
private void TechNodesClientAnyModificationHandler(NetworkSyncList <TechNode> source) { TechNodesChanged?.Invoke(); }
private void TechNodesClientAnyModificationHandler(NetworkSyncList <TechNode> source) { TechNodesChanged?.Invoke(); ClientCurrentCharacterHelper.Character.SharedSetFinalStatsCacheDirty(); }