示例#1
0
        public void ToCmp()
        {
            Console.ForegroundColor = ConsoleColor.DarkYellow;

            CFrame c1 = new CFrame(23.976, false, true);
            CFrame c2 = new CFrame(29.97, true, true);

            this.dsp(c1, "C1");
            this.dsp(c2, "C2");
            Console.WriteLine("equal [" + (c1 == c2) + "]");
            Console.WriteLine("------");

            c2.rate  = c1.rate;
            c2.drop  = c1.drop;
            c2.valid = c1.valid;

            this.dsp(c1, "C1");
            this.dsp(c2, "C2");
            Console.WriteLine("equal [" + (c1 == c2) + "]");
            Console.WriteLine("------");

            c2 = new CFrame(29.97, true, true);

            this.dsp(c1, "C1");
            this.dsp(c2, "C2");
            Console.WriteLine("------");
        }
示例#2
0
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            CFrame c = obj as CFrame;

            if ((Object)c == null)
            {
                return(false);
            }
            return(rate == c.rate && drop == c.drop && valid == c.valid);
        }
示例#3
0
 private void dsp(CFrame f, string m)
 {
     Console.WriteLine(m + " [" + f.rate + ", " + f.drop + ", " + f.valid + "]");
 }