public void AddAvatar(AvatarController avatar) { this._avatars.Add(avatar); avatar.ControllerStart(); if (applyThisLayerToAvatars != "") { int layer = LayerMask.NameToLayer(applyThisLayerToAvatars); if (layer >= 0) { foreach (BodyModel body in avatar.model.bodies) { BoneModel rootBone = body.root.root; foreach (KeyValuePair <string, ReprModel> entry in rootBone.point.reprs) { BasicHelpers.ApplyLayerRecursively(entry.Value.transformRef, layer); } } } } onAvatarEntered.Invoke(avatar.model.view); }
public void Merge(SerializableDictionary properties) { if (Properties.Update(properties)) { OnUpdated.Invoke(this); } }
public void RemoveAvatar(AvatarController avatar) { onAvatarLeft.Invoke(avatar.model.view); this._avatars.Remove(avatar); }