Exemplo n.º 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;
     }
 }
Exemplo n.º 2
0
 public override void OnAncestryChanged()
 {
     base.OnAncestryChanged();
     this.Camera = this.GetAncestor<GameState>().GetComponentByType<Camera>();
 }