Ejemplo n.º 1
0
        public void Entry(fk_AppWindow argWin, fk_Vector pos, int randSeed)
        {
            moveParticle = new MissileMoveParticle(argWin, randSeed);
            rand         = new Random(randSeed);

            mbody.Shape = bodyshape;
            mwing.Shape = wingshape;

            mbody.Material = fk_Material.White;
            mwing.Material = fk_Material.LavaRed;

            mbody.GlVec(0.0, 0.0, -1.0);
            mwing.GlAngle(3.0 * FK.PI / 2.0, FK.PI / 2.0, 0.0);
            mwing.GlMoveTo(0.0, -0.125, 0.5);

            mbody.BMode = fk_BoundaryMode.AABB;
            mbody.AdjustAABB();

            argWin.Entry(mbody);
            argWin.Entry(mwing);

            mmodel.EntryChild(mbody);
            mbody.EntryChild(mwing);


            argWin.Entry(mmodel);
            position = pos;
            mmodel.GlMoveTo(pos);
            if (moveMode == (int)MoveMode.RandCurve || moveMode == (int)MoveMode.RandLine)
            {
                randPos.x = rand.NextDouble() * 20.0 - 10.0;
                randPos.y = rand.NextDouble() * 20.0 - 10.0;
                randPos.z = rand.NextDouble() * 20.0 - 10.0;
            }
        }
Ejemplo n.º 2
0
 public void Entry(fk_AppWindow argWin)
 {
     pmodel.Shape    = cone;
     pmodel.Material = fk_Material.Red;
     pmodel.GlVec(0.0, 1.0, 0.0);
     Pos          = new fk_Vector(0.0, -20.0, 0.0);
     pmodel.BMode = fk_BoundaryMode.AABB;
     pmodel.AdjustAABB();
     argWin.Entry(pmodel);
 }
Ejemplo n.º 3
0
        public PlayerCharacter(fk_Vector _position, fk_AppWindow appWindow)
        {
            playerModel          = new fk_Model();
            playerModel.Shape    = new fk_Block(20.0, 40.0, 20.0);
            playerModel.Material = fk_Material.Blue;
            playerModel.GlMoveTo(_position);
            playerModel.SmoothMode = true;
            playerModel.BMode      = fk_BoundaryMode.AABB;
            playerModel.AdjustAABB();
            var playerHead = new fk_Model();

            playerHead.Shape    = new fk_Sphere(4, 10);
            playerHead.Material = fk_Material.Blue;
            playerHead.Parent   = playerModel;
            playerHead.GlMoveTo(new fk_Vector(0, 30, 0) + _position);
            var texture = new fk_RectTexture();

            if (texture.ReadPNG("Face.png") == false)
            {
                Console.WriteLine("File Read Error");
            }
            texture.TextureSize = new fk_TexCoord(20.0, 20.0);
            var textureModel = new fk_Model();

            textureModel.Shape    = texture;
            textureModel.Material = fk_Material.White;
            textureModel.Parent   = playerModel;
            textureModel.GlMoveTo(new fk_Vector(0, 70, 0) + _position);
            textureModel.GlAngle(Math.PI, -Math.PI / 2, 0);
            muzzules[0] = new fk_Model();
            muzzules[0].GlMoveTo(new fk_Vector(0, 10, 15) + _position);
            muzzules[0].Parent = playerModel;
            muzzules[1]        = new fk_Model();
            muzzules[1].GlMoveTo(new fk_Vector(-20, 10, 15) + _position);
            muzzules[1].Parent = playerModel;
            muzzules[2]        = new fk_Model();
            muzzules[2].GlMoveTo(new fk_Vector(20, 10, 15) + _position);
            muzzules[2].Parent = playerModel;
            appWindow.Entry(playerModel);
            appWindow.Entry(playerHead);
            appWindow.Entry(textureModel);
        }
Ejemplo n.º 4
0
        public Item(Type _type, fk_Vector position, fk_AppWindow window)
        {
            type        = _type;
            model.Shape = new fk_Block(15, 15, 15);
            model.GlMoveTo(position);
            model.SmoothMode = true;
            model.BMode      = fk_BoundaryMode.AABB;
            model.AdjustAABB();
            switch (type)
            {
            case Type.diffusion:
                model.Material = fk_Material.Pink;
                break;

            case Type.bomb:
                model.Material = fk_Material.Orange;
                break;
            }
            window.Entry(model);
        }