文档介绍:效果如下:详细代码如下:usingUnityEngine;;lassFire:MonoBehaviour{    floatspeed=;         publicGameObjectnewObject;              floatfiretima=;    floatnexttime=;              voidUpdate()    {        floata=-25*;        floatx=("Horizontal")**speed;        floatz=("Vertical")**speed;        (x,0,z);        if(())        {            (*a,);        }        if(())        {            (*a,);        }        if(("Fire1")&&nexttime<)        {            nexttime=firetima+;            GameObjectgo=Instantiate(newObject,,)asGameObject;            (0,0,1231);            Destroy(go,);        }             }}接下来,我们要做一个太空大战的小游戏具体实现效果是:1、我方点击鼠标左键或按空格键发射子弹,我方子弹连续发射2、敌方飞机和子弹自动运行,、我方飞机移动时,敌方子弹跟随我方飞机移动目前实现第一步代码部分代码如下:usingUnityEngine;;lassPlayer:MonoBehaviour{    floatspeed=-;         publicGameObjectMyplayer;                        voidUpdate()    {        floata=  ;        floatx=("Horizontal")**-speed;        floatz=("Vertical")**-speed;