資源簡介
實現效果:
點擊 “w” 鍵,坦克前進,點擊 “s” 鍵,坦克后退,點擊 “a” 鍵,坦克向左轉,點擊 “d” 鍵,坦克向右轉。
點擊 “空格” 鍵,坦克發射炮彈(這里的炮彈是一棵樹),當炮彈碰到物體時,物體和炮彈都消失。
當坦克走近關卡時,關卡自動打開,當坦克遠離關卡時,關卡自動閉合。
代碼片段和文件信息
using?System.Collections;
using?System.Collections.Generic;
using?UnityEngine;
public?class?Bullet?:?MonoBehaviour
{
????//public?Transform?effect;
????//?Start?is?called?before?the?first?frame?update
????void?Start()
????{
????????
????}
????void?OnCollisionEnter(Collision?other)
????{
????????//Transform?ef?=?Instantiate(effect?other.collider.transform.position?Quaternion.identity);
????????//Destroy(ef?3);
????????Debug.Log(“hhh“);
????????Destroy(other.gameobject);
????????Destroy(this.gameobject);
????}
????//?Update?is?called?once?per?frame
????void?Update()
????{
????????
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-10-19?18:48??work4\
?????文件???????42358??2019-10-19?10:12??work4\Assembly-CSharp.csproj
?????目錄???????????0??2019-10-19?10:59??work4\Assets\
?????文件?????????633??2019-10-19?10:59??work4\Assets\Bullet.cs
?????文件?????????243??2019-10-19?10:03??work4\Assets\Bullet.cs.me
?????文件?????????540??2019-10-19?10:28??work4\Assets\Door.cs
?????文件?????????243??2019-10-19?10:12??work4\Assets\Door.cs.me
?????目錄???????????0??2019-10-19?11:31??work4\Assets\Scenes\
?????文件???????23706??2019-10-19?11:31??work4\Assets\Scenes\SampleScene.unity
?????文件?????????155??2019-10-19?08:10??work4\Assets\Scenes\SampleScene.unity.me
?????文件?????????172??2019-10-19?08:10??work4\Assets\Scenes.me
?????目錄???????????0??2019-10-19?08:12??work4\Assets\SimpleMilitary\
?????文件?????????629??2015-07-17?04:52??work4\Assets\SimpleMilitary\Changelog.txt
?????文件??????????93??2015-07-17?04:52??work4\Assets\SimpleMilitary\Changelog.txt.me
?????目錄???????????0??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\
?????目錄???????????0??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\
?????文件??????105349??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_AssultRifleAuto.controller
?????文件??????????95??2015-07-17?04:51??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_AssultRifleAuto.controller.me
?????文件??????105279??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_AssultRifleSingle.controller
?????文件??????????95??2015-07-17?04:52??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_AssultRifleSingle.controller.me
?????文件??????105270??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_DeadBack.controller
?????文件??????????95??2015-07-17?04:53??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_DeadBack.controller.me
?????文件??????105271??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_DeadFront.controller
?????文件??????????95??2015-07-17?04:53??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_DeadFront.controller.me
?????文件??????104089??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_Grenade.controller
?????文件??????????95??2015-07-17?04:51??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_Grenade.controller.me
?????文件??????105275??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_Hands?on?hips.controller
?????文件??????????95??2015-07-17?04:52??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_Hands?on?hips.controller.me
?????文件??????102295??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_Pistol_Shooting.controller
?????文件??????????95??2015-07-17?04:51??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_Pistol_Shooting.controller.me
?????文件??????102285??2019-10-19?08:13??work4\Assets\SimpleMilitary\Demo\DemoAssets\Demo_Characters_RPG.controller
............此處省略4671個文件信息
- 上一篇:申抒含-基于圖像的大規模場景三維重建
- 下一篇:蜘蛛社會網絡分析技術
評論
共有 條評論