Beispiel #1
0
    public void AddNewBubbleType()
    {
        BubbleSettings b = new BubbleSettings();

        b.size  = minSize;
        b.color = Color.white;
        b.speed = minSpeed;
        bubbleSettings.Add(b);
    }
Beispiel #2
0
 public void Update(DestinyDestinationDefinition?other)
 {
     if (other is null)
     {
         return;
     }
     if (!DisplayProperties.DeepEquals(other.DisplayProperties))
     {
         DisplayProperties.Update(other.DisplayProperties);
         OnPropertyChanged(nameof(DisplayProperties));
     }
     if (PlaceHash != other.PlaceHash)
     {
         PlaceHash = other.PlaceHash;
         OnPropertyChanged(nameof(PlaceHash));
     }
     if (DefaultFreeroamActivityHash != other.DefaultFreeroamActivityHash)
     {
         DefaultFreeroamActivityHash = other.DefaultFreeroamActivityHash;
         OnPropertyChanged(nameof(DefaultFreeroamActivityHash));
     }
     if (!ActivityGraphEntries.DeepEqualsList(other.ActivityGraphEntries))
     {
         ActivityGraphEntries = other.ActivityGraphEntries;
         OnPropertyChanged(nameof(ActivityGraphEntries));
     }
     if (!BubbleSettings.DeepEqualsList(other.BubbleSettings))
     {
         BubbleSettings = other.BubbleSettings;
         OnPropertyChanged(nameof(BubbleSettings));
     }
     if (!Bubbles.DeepEqualsList(other.Bubbles))
     {
         Bubbles = other.Bubbles;
         OnPropertyChanged(nameof(Bubbles));
     }
     if (Hash != other.Hash)
     {
         Hash = other.Hash;
         OnPropertyChanged(nameof(Hash));
     }
     if (Index != other.Index)
     {
         Index = other.Index;
         OnPropertyChanged(nameof(Index));
     }
     if (Redacted != other.Redacted)
     {
         Redacted = other.Redacted;
         OnPropertyChanged(nameof(Redacted));
     }
 }
Beispiel #3
0
 public bool DeepEquals(DestinyDestinationDefinition?other)
 {
     return(other is not null &&
            (DisplayProperties is not null ? DisplayProperties.DeepEquals(other.DisplayProperties) : other.DisplayProperties is null) &&
            PlaceHash == other.PlaceHash &&
            DefaultFreeroamActivityHash == other.DefaultFreeroamActivityHash &&
            ActivityGraphEntries.DeepEqualsList(other.ActivityGraphEntries) &&
            BubbleSettings.DeepEqualsList(other.BubbleSettings) &&
            Bubbles.DeepEqualsList(other.Bubbles) &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }
        public bool Equals(DestinyDestinationDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DisplayProperties == input.DisplayProperties ||
                     (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties))
                     ) &&
                 (
                     PlaceHash == input.PlaceHash ||
                     (PlaceHash.Equals(input.PlaceHash))
                 ) &&
                 (
                     DefaultFreeroamActivityHash == input.DefaultFreeroamActivityHash ||
                     (DefaultFreeroamActivityHash.Equals(input.DefaultFreeroamActivityHash))
                 ) &&
                 (
                     ActivityGraphEntries == input.ActivityGraphEntries ||
                     (ActivityGraphEntries != null && ActivityGraphEntries.SequenceEqual(input.ActivityGraphEntries))
                 ) &&
                 (
                     BubbleSettings == input.BubbleSettings ||
                     (BubbleSettings != null && BubbleSettings.SequenceEqual(input.BubbleSettings))
                 ) &&
                 (
                     Bubbles == input.Bubbles ||
                     (Bubbles != null && Bubbles.SequenceEqual(input.Bubbles))
                 ) &&
                 (
                     Hash == input.Hash ||
                     (Hash.Equals(input.Hash))
                 ) &&
                 (
                     Index == input.Index ||
                     (Index.Equals(input.Index))
                 ) &&
                 (
                     Redacted == input.Redacted ||
                     (Redacted != null && Redacted.Equals(input.Redacted))
                 ));
        }
Beispiel #5
0
    public void AddNewBubble()
    {
        Vector3 newPos = new Vector3(Random.Range(leftBoundary.position.x, rightBoundary.position.x),
                                     Random.Range(leftBoundary.position.y, rightBoundary.position.y), leftBoundary.position.z);
        Bubble bubble = bubblesPool.Pull();

        bubble.transform.SetParent(playGround);
        bubble.transform.localScale = Vector3.one;
        bubble.transform.position   = newPos;

        if (bubbleSettings.Count > 0)
        {
            BubbleSettings bubbleSetting = bubbleSettings[Random.Range(0, bubbleSettings.Count)];
            bubble.SetupBubble(bubbleSetting.size, bubbleSetting.color, bubbleSetting.speed, (int)(maxSize - bubbleSetting.size + minSize), audioClip);
        }
        else
        {
            float size = Random.Range(minSize, maxSize);
            bubble.SetupBubble(size, Color.blue, minSpeed, (int)(maxSize - size + minSize), audioClip);
        }

        bubbles.Add(bubble);
    }