Example #1
0
 public override void OnAncestryChanged()
 {
     base.OnAncestryChanged();
     this.Camera = null;
     Component iter = this.Parent;
     while (iter != null)
     {
         if (iter is Camera)
         {
             this.Camera = iter as Camera;
             break;
         }
         iter = iter.Parent;
     }
 }
Example #2
0
 public override void OnAncestryChanged()
 {
     base.OnAncestryChanged();
     this.Camera = this.GetAncestor<GameState>().GetComponentByType<Camera>();
 }