示例#1
0
        private bool SectionScene(string[] tokens)
        {
            scene = new MqoScene();

            switch (tokens[0].ToLower())
            {
            case "pos":         scene.pos = Point3.Parse(tokens, 1);  return(true);

            case "lookat":      scene.lookat = Point3.Parse(tokens, 1);  return(true);

            case "head":        scene.head = float.Parse(tokens[1]);  return(true);

            case "pich":        scene.pich = float.Parse(tokens[1]);  return(true);

            case "ortho":       scene.ortho = float.Parse(tokens[1]);  return(true);

            case "zoom2":       scene.zoom2 = float.Parse(tokens[1]);  return(true);

            case "amb":         scene.amb = Color3.Parse(tokens, 1);  return(true);

            case "}":                                                           return(false);

            //default:            Error(tokens);                                  return false;
            default:                                                            return(true);
            }
        }
示例#2
0
        bool SectionScene(string[] tokens)
        {
            MqoScene scene = new MqoScene();

            mqo.scene = scene;

            switch (tokens[0])
            {
            case "pos": scene.pos = Point3.Parse(tokens, 1); break;

            case "lookat": scene.lookat = Point3.Parse(tokens, 1); break;

            case "head": scene.head = float.Parse(tokens[1]); break;

            case "pich": scene.pich = float.Parse(tokens[1]); break;

            case "ortho": scene.ortho = float.Parse(tokens[1]); break;

            case "zoom2": scene.zoom2 = float.Parse(tokens[1]); break;

            case "amb": scene.amb = Color3.Parse(tokens, 1); break;

            case "dirlights":
            {
                // dirlights 1 {
                // ...
                // }
                if (tokens[2] != "{")
                {
                    Error(tokens);
                }

                DoRead(SectionDirlights);
            }
            break;

            case "}":
                return(false);
            }
            return(true);
        }