protected Bubble(long time, BubbleDirection direction, Service service) { Status = BubbleStatus.Waiting; Time = time; Direction = direction; Service = service; }
public ContactBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string name, byte[] vCardData, string idService = null) : base(time, direction, address, participantAddress, party, service, null, idService) { Name = name; VCardData = vCardData; }
public ComposeBubble(long time, BubbleDirection direction, Service service, VisualBubble bubbleToSend, Contact.ID[] ids) : base(time, direction, service) { Ids = ids; BubbleToSend = bubbleToSend; }
public PresenceBubble(long time, BubbleDirection direction, string address, bool party, Service service, bool available) : base(time, direction, service) { Presence = available ? PresenceType.Online : PresenceType.Unavailable; Platform = PlatformType.None; Address = address; Party = party; }
public SubscribeBubble(long time, BubbleDirection direction, string address, bool party, Service service, bool subscribe) : base(time, direction, service) { Address = address; Party = party; Subscribe = subscribe; }
public VideoBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string videoPath, Type videoType, byte[] thumbnailBytes, string idService = null) : base(time, direction, address, participantAddress, party, service, null, idService) { VideoPath = videoPath; VideoType = videoType; ThumbnailBytes = thumbnailBytes; }
public TypingBubble(long time, BubbleDirection direction, string address, bool party, Service service, bool typing, bool isAudio) : base(time, direction, service) { Address = address; Party = party; Typing = typing; IsAudio = isAudio; }
public PresenceBubble(long time, BubbleDirection direction, string address, bool party, Service service, PresenceType presence, PlatformType platform) : base(time, direction, service) { Presence = presence; Platform = platform; Address = address; Party = party; }
public PartyInformationBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string idService, InformationType type, string influencer, string affected) : base(time, direction, address, participantAddress, party, service, null, idService) { Influencer = influencer; Affected = affected; Type = type; }
public AudioBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string audioPath, Type audioType, bool recording, int seconds, string idService = null) : base(time, direction, address, participantAddress, party, service, null, idService) { AudioPath = audioPath; AudioType = audioType; Recording = recording; Seconds = seconds; }
public ReadBubble(long time, BubbleDirection direction, Service service, string address, string participantAddress, long readTime, bool party, bool updated) : base(time, direction, service) { Address = address; ReadTime = readTime; ParticipantAddress = participantAddress; Party = party; Updated = updated; }
public LocationBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, double longitude, double latitude, string name, byte[] thumbnail, string idService = null) : base(time, direction, address, participantAddress, party, service, null, idService) { Longitude = longitude; Latitude = latitude; Name = name; Thumbnail = thumbnail; }
public FileBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string path, Type pathType, string fileName, string mimeType, string idService = null) : base(time, direction, address, participantAddress, party, service, null, idService) { Path = path; PathType = pathType; FileName = fileName; MimeType = mimeType; }
public ImageBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string imagePath, Type imageType, byte[] thumbnailBytes, string idService = null, bool isAnimated = false) : base(time, direction, address, participantAddress, party, service, null, idService) { ImagePath = imagePath; ImageType = imageType; ThumbnailBytes = thumbnailBytes; IsAnimated = isAnimated; }
private void CorrectAnchorPositionByOrder(List <SpecialPointGuider> sortList) { if (sortList.Count > 0) { SortGuiderByOrderOfPosY(ref sortList); ChangeNamesOfOutsideUIList(sortList); BubbleDirection bubbleDir = GetCurrentBubbleDirection(sortList); BubbleUI(sortList, bubbleDir); } }
public StickerBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string stickerId, Type stickerType, int width, int height, string staticImage, string animatedImage, string idService = null) : base(time, direction, address, participantAddress, party, service, null, idService) { StickerType = stickerType; StickerId = stickerId; Width = width; Height = height; StaticImage = staticImage; AnimatedImage = animatedImage; }
private BubbleDirection GetCurrentBubbleDirection(List <SpecialPointGuider> sortList) { BubbleDirection direction = BubbleDirection.FromTopToBottom; float firstElementPosY = sortList[0].OutsideUI.anchoredPosition.y; float lastElementPosY = sortList[sortList.Count - 1].OutsideUI.anchoredPosition.y; if (firstElementPosY >= TopBoundaryInY_) { direction = BubbleDirection.FromTopToBottom; } if (lastElementPosY <= BottomBoundaryInY_) { direction = BubbleDirection.FromBottomToUp; } return(direction); }
protected VisualBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string id = null, string idService = null) : base(time, direction, service) { Address = address; ParticipantAddress = participantAddress; Party = party; IdService = idService; if (id == null) { ID = Guid.NewGuid().ToString(); } else { ID = id; } }
//use the player's firePoint transform rotation angel to figure out if we want to blow the bubble up, right, left, or down //then use the bubbles transform to set its top/bottom levels and velocity void SetDirectionLevelsAndVelocity() { Transform firePointTransform = GameObject.Find("Player Prefab").transform.GetChild(0); float angle = firePointTransform.rotation.eulerAngles.z; switch (angle) { case 90: //up direction = BubbleDirection.Up; topLevel = transform.position.x - 1; bottomLevel = transform.position.x + 1; rb.velocity = new Vector3(-1, 1, 0) * speed; break; case 0: //right direction = BubbleDirection.Right; topLevel = transform.position.y + 1; bottomLevel = transform.position.y - 1; rb.velocity = new Vector3(1, 1, 0) * speed; break; case 270: //down direction = BubbleDirection.Down; topLevel = transform.position.x - 1; bottomLevel = transform.position.x + 1; rb.velocity = new Vector3(-1, -1, 0) * speed; break; case 180: //left direction = BubbleDirection.Left; topLevel = transform.position.y + 1; bottomLevel = transform.position.y - 1; rb.velocity = new Vector3(-1, 1, 0) * speed; break; default: //shouldn't happen but just incase default to left direction = BubbleDirection.Left; topLevel = transform.position.y + 1; bottomLevel = transform.position.y - 1; rb.velocity = new Vector3(-1, 1, 0) * speed; break; } }
private void BubbleUI(List <SpecialPointGuider> sortList, BubbleDirection direction) { if (direction == BubbleDirection.FromBottomToUp) { sortList.Reverse();//reverse the sort list when bubble from the last element to the first. } for (int i = 0; i < sortList.Count; i++) { RectTransform targetGuider = sortList[i].OutsideUI; if (direction == BubbleDirection.FromTopToBottom) { bool isFirstElement = i == 0; if (isFirstElement && targetGuider.anchoredPosition.y > TopBoundaryInY_) { float newX = targetGuider.anchoredPosition.x;//not need corrected. targetGuider.anchoredPosition = new Vector2(newX, TopBoundaryInY_); } } else { bool isLastElement = i == sortList.Count - 1; if (isLastElement && targetGuider.anchoredPosition.y < BottomBoundaryInY_) { float newX = targetGuider.anchoredPosition.x; targetGuider.anchoredPosition = new Vector2(newX, BottomBoundaryInY_); } } for (int j = i + 1; j < sortList.Count; j++) { RectTransform compareGuider = sortList[j].OutsideUI; Vector3 offset = Vector3.up * GuiderOffsetHeight_ * (int)direction; //compared with the previous element and get the offset value by direction. compareGuider.anchoredPosition = targetGuider.localPosition + offset; } } }
public DeliveredBubbleReceipt(long time, BubbleDirection direction, Service service, VisualBubble bubbleUpdated) : base(time, direction, service) { BubbleUpdated = bubbleUpdated; }
public PartyInformationBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string message) : base(time, direction, address, participantAddress, party, service) { Message = message; }
protected AbstractBubble(long time, BubbleDirection direction, Service service) : base(time, direction, service) { }
public DeliveredBubble(long time, BubbleDirection direction, Service service, string address, string visualBubbleID) : base(time, direction, service) { Address = address; VisualBubbleID = visualBubbleID; }
public NewDayBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service) : base(time, direction, address, participantAddress, party, service) { }
public TextBubble(long time, BubbleDirection direction, string address, string participantAddress, bool party, Service service, string message, string idService = null) : base(time, direction, address, participantAddress, party, service, null, idService) { Message = message; }