Exemple #1
0
            public override bool Equals(object obj)
            {
                Good2 rhs = obj as Good2;

                if ((object)rhs == null)
                {
                    return(false);
                }

                return(name == rhs.name && weight == rhs.weight);
            }
Exemple #2
0
            public int CompareTo(Good2 rhs)
            {
                int result = m_name.CompareTo(rhs.m_name);

                if (result == 0)
                {
                    result = m_address.CompareTo(rhs.m_address);
                }

                return(result);
            }
Exemple #3
0
            public override bool Equals(object rhsObj)
            {
                if (rhsObj == null)
                {
                    return(false);
                }

                Good2 rhs = rhsObj as Good2;

                return(m_name == rhs.m_name && m_address == rhs.m_address);
            }
Exemple #4
0
            public override bool Equals(object rhsObj)
            {
                if (rhsObj == null)
                {
                    return(false);
                }

                Good2 rhs = rhsObj as Good2;

                return(this == rhs);
            }
Exemple #5
0
            public static bool operator==(Good3 lhs, Good3 rhs)
            {
                Good2 ick = new Good2();

                if (lhs.name == ick.IckyField)                  // ok to use fields from other types
                {
                    return(rhs.name.Length == 0 && lhs.weight == rhs.weight);
                }
                else
                {
                    return(lhs.name == rhs.name && lhs.weight == rhs.weight);
                }
            }
Exemple #6
0
            // Equals matches GetHashCode
            public bool Equals(Good2 rhs)
            {
                if (object.ReferenceEquals(this, rhs))
                {
                    return(true);
                }

                if ((object)rhs == null)
                {
                    return(false);
                }

                return(name == rhs.name && address == rhs.address);
            }
 public void Verify2E()
 {
     if (!Timer.gameEnded && !EquationControl.verified2 && !EquationControl.controlLoss)
     {
         if (EquationControl.n3 == EquationControl.CorrectInts[1])
         {
             Bad2.SetActive(false);
             Good2.SetActive(true);
             FindObjectOfType <SoundManager>().PlaySound("success3");
             EquationControl.score++;
             EquationControl.verified2 = true;
         }
         else
         {
             FindObjectOfType <SoundManager>().PlaySound("incorrectanswer");
             Bad2.SetActive(true);
         }
     }
 }
Exemple #8
0
            public bool Equals(Good2 rhs)
            {
                if (object.ReferenceEquals(this, rhs))
                {
                    return(true);
                }

                if ((object)rhs == null)
                {
                    return(false);
                }

                if (!base.Equals(rhs))
                {
                    return(false);
                }

                return(state == rhs.state);
            }
            // Equals matches GetHashCode
            public bool Equals(Good2 rhs)
            {
                if (object.ReferenceEquals(this, rhs))
                    return true;

                if ((object) rhs == null)
                    return false;

                return name == rhs.name && address == rhs.address;
            }
Exemple #10
0
            public bool Equals(Good2 rhs)
            {
                if (object.ReferenceEquals(this, rhs))
                    return true;

                if ((object) rhs == null)
                    return false;

                if (!base.Equals(rhs))
                    return false;

                return state == rhs.state;
            }