2011年5月10日 星期二

SpaceInvader作業-2

1. WindowForm 整合(執行DxStudio 的 Visual Studio ToolBox 選項)

2. WindowForm 工具箱增加Player選項

3. 加入修改後之SpaceInvader

4. 分別建立由表單應用程式執行script函數(shoot, addBigInvader)與讀、寫參數的按鈕事件:
        private void button1_Click(object sender, EventArgs e)
        {
            axDXStudioPlayer1.Send("scenes.scene_1.script.shoot()");
        }
        private void button2_Click(object sender, EventArgs e)
        {
            axDXStudioPlayer1.Send("scenes.scene_1.script.addBigInvader()");
        }
        private void button3_Click(object sender, EventArgs e)
        {
            string cam = "";
            axDXStudioPlayer1.GetPropertyAsString("layers.layer_1.camera", out cam);
            if (cam == "camera_1")
                axDXStudioPlayer1.Send("layers.layer_1.camera = 'camera_2'");
            else
                axDXStudioPlayer1.Send("layers.layer_1.camera = 'camera_1'");
        }

沒有留言:

張貼留言