Exemplo n.º 1
0
        public Crate()
        {
            OBJ_File obj = new OBJ_File();

            Name = "Crate";
            obj.Load("C:\\Users\\Michael\\Documents\\XNA\\Hunt-Or-Gatherers\\Models\\Objects\\Crate.obj", Engine.g, new Vector3(0, 0, 0), Vector3.Zero, 1f, false, false, this);


            Display = new CharcoalEngine._2D.Panel();

            Display.Bounds            = new Vector2(300, 300);
            ((Panel)Display).Position = new Vector2(300, 300);
            Panel p = (Panel)Display;

            p.BGColor = Color.Gray;

            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    p.Children.Add(new Panel());
                    p.Children[p.Children.Count - 1].Position         = new Vector2(13 + i * 100, 13 + j * 100);
                    ((Panel)p.Children[p.Children.Count - 1]).BGColor = new Color(i / 3.0f, j / 3.0f, 1.0f);
                    p.Children[p.Children.Count - 1].Bounds           = new Vector2(75, 75);
                    p.Children[p.Children.Count - 1].Visible          = true;
                }
            }
        }
Exemplo n.º 2
0
        public Sky()
        {
            Children.Add(new Transform());
            OBJ_File obj = new OBJ_File();

            Name = "Sky_Geometry";
            obj.Load(Application.StartupPath + "Sky.obj", Engine.g, new Vector3(0, 0, 0), Vector3.Zero, 1f, false, false, Children[0]);
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="scene"></param>
        public Torch(Scene scene)
        {
            Children.Add(new Transform());
            OBJ_File obj = new OBJ_File();

            Name = "Torch";
            obj.Load("C:\\Users\\Michael\\Documents\\XNA\\3D Models\\MedievalBarrel (1)\\MedievalBarrel\\MedievalBarrel_OBJ.obj", Engine.g, new Vector3(0, 0, 0), Vector3.Zero, 1f, false, false, Children[0]);
        }
Exemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="scene"></param>
        public Door(Scene scene)
        {
            rig = new AnimationRig();
            Children.Add(rig);
            OBJ_File obj = new OBJ_File();

            Name = "Door";
            obj.Load("C:\\Users\\Michael\\Documents\\XNA\\Hunt-Or-Gatherers\\Models\\Objects\\door.obj", Engine.g, new Vector3(0, 0, 0), Vector3.Zero, 1f, false, false, rig);
            rig.Children[0].Center = -rig.Children[0].Position;
            rig.Children.Add(new Transform()
            {
                Position = rig.Children[0].Position
            });
            rig.Children.Add(new Transform()
            {
                Position     = rig.Children[0].Position,
                YawPitchRoll = new Vector3(MathHelper.ToRadians(90), 0, 0)
            }
                             );
            rig.Update_Rig = false;
        }