香港新手遊戲開發者論壇

 找回密碼
 立即註冊
查看: 1009|回復: 0

Panda3d教學(五)運行程式

[複製鏈接]

16

主題

29

帖子

220 小時

在線時間

版主

Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7Rank: 7

積分
378
發表於 2019-12-5 19:26:11 | 顯示全部樓層 |閱讀模式

馬上註冊,結交更多好友,享用更多功能,讓你輕鬆玩轉社區。

您需要 登錄 才可以下載或查看,沒有帳號?立即註冊

x
本帖最後由 小丑遊戲 於 2019-12-5 07:38 PM 編輯

官方教學鍊結:https://www.panda3d.org/manual/?title=Running_your_Program
漢化教學帖子前言(第二層):http://power-plant.dlinkddns.com/newplayer-hk/forum.php?mod=viewthread&tid=966&extra=page%3D1

使用命令提示字元運行你的程式

You can run your script by using your computer’s ‘Command Prompt’. You can access this by clicking ‘Start > All Programs > Accessories > Command Prompt’, or by going to 'Start > Run' and typing 'cmd'. When it opens, it should look something like this:



At the moment it’s pointing to its default directory, which in my case is ‘Documents and Settings’ (it doesn’t matter if yours is different). We need to change the directory to the one where we saved our script. To do this, we use the cd command. This stands for ‘change directory’. Type the following text behind the > symbol:

cd C:\Panda3D-1.9.4\mystuff\

Instead of version 1.9.4, you should type the version number of Panda that you have downloaded and installed. Please note that this folder name is case-sensitive and must match exactly (other than the version number, of course). Then, press the ‘Enter’ key on your keyboard. You should now have the following on the Command Prompt:



This means that it’s now pointing to the right directory. To run your script and start Panda3D, type the following text behind the > symbol:

ppython myscript.py



Press the ‘Enter’ key on your keyboard. This will run the version of Python that is distributed with Panda3D. If all is well, Panda3D will start and you should see the main rendering window appear.



This is a empty program, it won't do anything. The next step is to add additional commands to the program, as described in one of the following tutorials.

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

手機版|Archiver|植物油氣

GMT+8, 2024-9-20 03:13 AM , Processed in 0.052220 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表