예제 #1
0
        public void Setup2()
        {
            _root = new GameObject().AddComponent <Root>();

            _grandchild = new GameObject().AddComponent <Grandchild>();
            _grandchild.transform.SetParent(_root.transform);
        }
예제 #2
0
        private static void V2Example()
        {
            var grandchild = new Grandchild("Mario");

            var child  = new Child(grandchild);
            var parent = new Parent(child);

            var lf = new MkT <Grandchild>(p => new Grandchild(p.Name + " Rossi"));

            var result = Everywhere(lf, parent);
        }
        public void Setup1()
        {
            _root = new GameObject("root").AddComponent <Root>();

            _child1 = new GameObject("child1").AddComponent <Child>();
            _child1.transform.SetParent(_root.transform);

            _child2 = new GameObject("child2").AddComponent <Child>();
            _child2.transform.SetParent(_root.transform);

            _grandchild = new GameObject("grandchild").AddComponent <Grandchild>();
            _grandchild.transform.SetParent(_child1.transform);
        }
예제 #4
0
        void InitScene()
        {
            _root = new GameObject().AddComponent <Root>();

            _child1 = new GameObject().AddComponent <Child>();
            _child1.transform.SetParent(_root.transform);

            _child2 = new GameObject().AddComponent <Child>();
            _child2.transform.SetParent(_root.transform);

            _grandchild = new GameObject().AddComponent <Grandchild>();
            _grandchild.transform.SetParent(_child1.transform);
        }
예제 #5
0
        public void SetUp()
        {
            _root = new GameObject().AddComponent <Root>();

            _child1 = new GameObject().AddComponent <Child>();
            _child1.transform.SetParent(_root.transform);

            _child2 = new GameObject().AddComponent <Child>();
            _child2.transform.SetParent(_child1.transform);
            _child3 = _child2.gameObject.AddComponent <Child>();

            _grandchild = new GameObject().AddComponent <Grandchild>();
            _grandchild.transform.SetParent(_child2.transform);
        }
예제 #6
0
 public static void Main()
 {
     Grandchild g = new Grandchild();
 }
예제 #7
0
        public void GrandChild()
        {
            bool pc = false;
              bool cc = false;
              bool cpc = false;
              bool ccc = false;
              Csla.Core.ChildChangedEventArgs cca = null;

              var root = new Grandchild();
              root.PropertyChanged += (o, e) =>
              {
            pc = true;
              };
              root.ChildChanged += (o, e) =>
              {
            cc = true;
              };
              root.Child.PropertyChanged += (o, e) =>
              {
            cpc = true;
              };
              root.Child.ChildChanged += (o, e) =>
              {
            ccc = true;
            cca = e;
              };
              root.Child.Child.Name = "abc";
              Assert.IsFalse(cpc, "C PropertyChanged should not have fired");
              Assert.IsTrue(ccc, "C ChildChanged should have fired");
              Assert.IsFalse(pc, "PropertyChanged should not have fired");
              Assert.IsTrue(cc, "ChildChanged should have fired");
              Assert.IsTrue(ReferenceEquals(root.Child.Child, cca.ChildObject), "Ref should be equal");
        }