Esempio n. 1
0
        private void Start()
        {
            dataEntityCollection = Service.Get <CPDataEntityCollection>();
            dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <ProfileData> >(onProfileDataAdded);
            dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.ComponentAddedEvent <MembershipData> >(onMembershipDataAdded);
            friendAvatarRenderer = GetComponent <AvatarImageComponent>();
            AvatarImageComponent avatarImageComponent = friendAvatarRenderer;

            avatarImageComponent.OnImageReady = (Action <DataEntityHandle, Texture2D>)Delegate.Combine(avatarImageComponent.OnImageReady, new Action <DataEntityHandle, Texture2D>(onImageReady));
            ownerDataLoader = dataEntityCollection.When <SceneOwnerData>("ActiveSceneData", showOwner);
        }