Example #1
0
 public override void OnAdd(Component parent)
 {
     base.OnAdd(parent);
     this.layer = parent as Layer3D;
     if (this.layer == null)
         throw new Exception("Origin object must be added to a Layer3D instance!");
 }
Example #2
0
 protected override void Initialize()
 {
     GameState gs = new GameState();
     Layer3D l = new Layer3D();
     #if !DEBUG
     l.AddComponent(new Origin(5));
     #endif
     l.AddComponent(this.mr = new ModelRenderer("suzanne", Vector3.Zero, Vector3.Zero, 2));
     gs.AddComponent(l);
     PushState(gs);
 }