• 大小: 83.75MB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-02-12
  • 语言: 其他
  • 标签: unity3D  

资源简介

unity案例入门坦克大战源码,自己照着官网的视频做出来的,仅供学习

资源截图

代码片段和文件信息

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Bullet : MonoBehaviour
{

    public float bulletSpeed;

    public Gameobject bulletExplosion;


    public int damage;

    // Use this for initialization
    void Start()
    {
        this.GetComponent().velocity = this.transform.forward * this.bulletSpeed;
    }

    public void OnTriggerEnter(Collider other)
    {
  
        if (other.tag == “Player“)
        {
            other.SendMessage(“getShot“ this.damage);
        }

        Instantiate(this.bulletExplosion this.transform.position this.transform.rotation);

        Destroy(this.gameobject);
    }


}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-12-26 21:00  Tank\
     目录           0  2018-12-21 18:33  Tank\.vs\
     目录           0  2018-12-21 18:33  Tank\.vs\Tank\
     目录           0  2018-12-21 18:33  Tank\.vs\Tank\v15\
     文件      248320  2018-12-22 17:59  Tank\.vs\Tank\v15\.suo
     目录           0  2018-12-21 18:33  Tank\.vs\Tank\v15\Server\
     目录           0  2018-12-21 18:33  Tank\.vs\Tank\v15\Server\sqlite3\
     文件           0  2018-12-20 14:42  Tank\.vs\Tank\v15\Server\sqlite3\db.lock
     文件     1642496  2018-12-22 15:36  Tank\.vs\Tank\v15\Server\sqlite3\storage.ide
     文件       32768  2018-12-22 16:55  Tank\.vs\Tank\v15\Server\sqlite3\storage.ide-shm
     文件     4152992  2018-12-22 15:40  Tank\.vs\Tank\v15\Server\sqlite3\storage.ide-wal
     文件       26190  2018-12-21 18:36  Tank\Assembly-CSharp-Editor.csproj
     文件       29439  2018-12-21 21:10  Tank\Assembly-CSharp.csproj
     目录           0  2018-12-22 15:36  Tank\Assets\
     文件       36304  2018-07-19 22:31  Tank\Assets\_Complete-Game.unity
     文件         184  2018-07-19 22:31  Tank\Assets\_Complete-Game.unity.meta
     文件         202  2018-07-19 22:31  Tank\Assets\_Completed-Assets.meta
     目录           0  2018-12-21 18:33  Tank\Assets\_Completed-Assets\
     文件         202  2018-07-19 22:32  Tank\Assets\_Completed-Assets\Animators.meta
     目录           0  2018-12-21 18:33  Tank\Assets\_Completed-Assets\Animators\
     文件        7064  2018-07-19 22:32  Tank\Assets\_Completed-Assets\Animators\CompletePumpjack.controller
     文件         189  2018-07-19 22:32  Tank\Assets\_Completed-Assets\Animators\CompletePumpjack.controller.meta
     文件         202  2018-07-19 22:30  Tank\Assets\_Completed-Assets\AudioMixers.meta
     目录           0  2018-12-21 18:33  Tank\Assets\_Completed-Assets\AudioMixers\
     文件        8044  2018-07-19 22:31  Tank\Assets\_Completed-Assets\AudioMixers\CompleteMainMix.mixer
     文件         189  2018-07-19 22:31  Tank\Assets\_Completed-Assets\AudioMixers\CompleteMainMix.mixer.meta
     文件         202  2018-07-19 22:31  Tank\Assets\_Completed-Assets\Prefabs.meta
     目录           0  2018-12-21 22:08  Tank\Assets\_Completed-Assets\Prefabs\
     文件      120508  2018-12-20 15:31  Tank\Assets\_Completed-Assets\Prefabs\CompleteDustTrail.prefab
     文件         189  2018-07-19 22:32  Tank\Assets\_Completed-Assets\Prefabs\CompleteDustTrail.prefab.meta
     文件      100548  2018-07-19 22:30  Tank\Assets\_Completed-Assets\Prefabs\CompleteLevelArt.prefab
............此处省略9198个文件信息

评论

共有 条评论