Пример #1
0
 public void ShootEvent(string slot)
 {
     if (Root.Instance.IsAuthoritive)
     {
         Cube c = new Cube();
         Root.Instance.Scene.Spawn(c);
         c.Position = Position;
         c.Orientation = Orientation;
         c.Physics.Speed = Direction * 100;
     }
 }
Пример #2
0
        public override void Start()
        {
            base.Start();

            for (int i = 0; i < 10; ++i)
            {
                Cube c = new Cube();
                Root.Instance.Scene.Spawn(c);
                c.Position = new Vector3(0, 350 + i * 2, 0);
                cubes.Add(c);
            }
            //Root.Instance.Scene.Spawn(new Floor());

            Root.Instance.Scene.Spawn(light = new Light());
            light.Position = new Vector3(1, 1, 1);
            light.directional = true;
            light.diffuse = new Color4f(0.5f, 0.5f, 0.5f);

            Root.Instance.Scene.Spawn(new Terrain());
        }