Exemplo n.º 1
0
 protected Bubble(long time, BubbleDirection direction, Service service)
 {
     Status = BubbleStatus.Waiting;
     Time = time;
     Direction = direction;
     Service = service;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public ComposeBubble(long time, BubbleDirection direction, Service service,
                      VisualBubble bubbleToSend, Contact.ID[] ids)
     : base(time, direction, service)
 {
     Ids          = ids;
     BubbleToSend = bubbleToSend;
 }
Exemplo n.º 4
0
 public ComposeBubble(long time, BubbleDirection direction, Service service, 
     VisualBubble bubbleToSend, Contact.ID[] ids) 
     : base(time, direction, service)
 {
     Ids = ids;
     BubbleToSend = bubbleToSend;
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 protected Bubble(long time, BubbleDirection direction, Service service)
 {
     Status    = BubbleStatus.Waiting;
     Time      = time;
     Direction = direction;
     Service   = service;
 }
Exemplo n.º 7
0
 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;
 }
Exemplo n.º 8
0
 public SubscribeBubble(long time, BubbleDirection direction, string address,
                        bool party, Service service, bool subscribe)
     : base(time, direction, service)
 {
     Address   = address;
     Party     = party;
     Subscribe = subscribe;
 }
Exemplo n.º 9
0
 public SubscribeBubble(long time, BubbleDirection direction, string address,
     bool party, Service service, bool subscribe)
     : base(time, direction, service)
 {
     Address = address;
     Party = party;
     Subscribe = subscribe;
 }
Exemplo n.º 10
0
 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;
 }
Exemplo n.º 11
0
 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;
 }
Exemplo n.º 12
0
 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;
 }
Exemplo n.º 13
0
        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;
        }
Exemplo n.º 14
0
 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;
 }
Exemplo n.º 16
0
 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;
 }
Exemplo n.º 17
0
 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;
 }
Exemplo n.º 18
0
 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;
 }
Exemplo n.º 19
0
 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;
 }
Exemplo n.º 20
0
 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;
 }
Exemplo n.º 21
0
 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;
 }
Exemplo n.º 22
0
 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;
 }
Exemplo n.º 23
0
 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;
 }
Exemplo n.º 24
0
 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;
 }
Exemplo n.º 25
0
		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;
		}
Exemplo n.º 26
0
 private void CorrectAnchorPositionByOrder(List <SpecialPointGuider> sortList)
 {
     if (sortList.Count > 0)
     {
         SortGuiderByOrderOfPosY(ref sortList);
         ChangeNamesOfOutsideUIList(sortList);
         BubbleDirection bubbleDir = GetCurrentBubbleDirection(sortList);
         BubbleUI(sortList, bubbleDir);
     }
 }
Exemplo n.º 27
0
 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;
 }
Exemplo n.º 28
0
 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;
 }
Exemplo n.º 29
0
 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;
 }
Exemplo n.º 30
0
 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;
 }
Exemplo n.º 31
0
 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;
 }
Exemplo n.º 32
0
    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);
    }
Exemplo n.º 33
0
        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;
            }
        }
Exemplo n.º 34
0
        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;
            }
        }
Exemplo n.º 35
0
    //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;
        }
    }
Exemplo n.º 36
0
    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;
            }
        }
    }
Exemplo n.º 37
0
 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;
 }
Exemplo n.º 39
0
        protected AbstractBubble(long time, BubbleDirection direction, Service service) : base(time, direction, service)
        {

        }
Exemplo n.º 40
0
		public DeliveredBubble(long time, BubbleDirection direction, Service service, string address, string visualBubbleID)
			 : base(time, direction, service)
        {
			Address = address;
            VisualBubbleID = visualBubbleID;
        }
Exemplo n.º 41
0
 public DeliveredBubble(long time, BubbleDirection direction, Service service, string address, string visualBubbleID)
     : base(time, direction, service)
 {
     Address        = address;
     VisualBubbleID = visualBubbleID;
 }
Exemplo n.º 42
0
 public NewDayBubble(long time, BubbleDirection direction, string address,
     string participantAddress, bool party, Service service) :
     base(time, direction, address, participantAddress, party, service)
 {
 }
Exemplo n.º 43
0
 protected AbstractBubble(long time, BubbleDirection direction, Service service) : base(time, direction, service)
 {
 }
 public DeliveredBubbleReceipt(long time, BubbleDirection direction, Service service, VisualBubble bubbleUpdated)
     : base(time, direction, service)
 {
     BubbleUpdated = bubbleUpdated;
 }
Exemplo n.º 45
0
 public NewDayBubble(long time, BubbleDirection direction, string address,
                     string participantAddress, bool party, Service service) :
     base(time, direction, address, participantAddress, party, service)
 {
 }
Exemplo n.º 46
0
 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;
 }
Exemplo n.º 47
0
 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;
 }
Exemplo n.º 48
0
 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;
 }