资源简介
不错的3D炸弹超人小demo
包括炸弹的位置 爆炸判断等
可以参考下
代码片段和文件信息
/*
* Copyright (c) 2017 Razeware LLC
*
* Permission is hereby granted free of charge to any person obtaining a copy
* of this software and associated documentation files (the “Software“) to deal
* in the Software without restriction including without limitation the rights
* to use copy modify merge publish distribute sublicense and/or sell
* copies of the Software and to permit persons to whom the Software is
* furnished to do so subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* Notwithstanding the foregoing you may not use copy modify merge publish
* distribute sublicense create a derivative work and/or sell copies of the
* Software in any work that is designed intended or marketed for pedagogical or
* instructional purposes related to programming coding application development
* or information technology. Permission for such use copying modification
* merger publication distribution sublicensing creation of derivative works
* or sale is expressly withheld.
*
* THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
* IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
* LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using UnityEngine;
using System.Collections;
using System.Runtime.CompilerServices;
public class Bomb : MonoBehaviour
{
public AudioClip explosionSound;
public Gameobject explosionPrefab;
public layerMask levelMask;
// This layerMask makes sure the rays cast to check for free spaces only hits the blocks in the level
private bool exploded = false;
// Use this for initialization
void Start ()
{
Invoke (“Explode“ 3f); //Call Explode in 3 seconds
}
void Explode ()
{
//Explosion sound
AudioSource.PlayClipAtPoint (explosionSound transform.position);
//Create a first explosion at the bomb position
Instantiate (explosionPrefab transform.position Quaternion.identity);
//For every direction start a chain of explosions
StartCoroutine (CreateExplosions (Vector3.forward));
StartCoroutine (CreateExplosions (Vector3.right));
StartCoroutine (CreateExplosions (Vector3.back));
StartCoroutine (CreateExplosions (Vector3.left));
GetComponent ().enabled = false; //Disable mesh
exploded = true;
transform.Find (“Collider“).gameobject.SetActive (false); //Disable the collider
Destroy (gameobject .3f); //Destroy the actual bomb in 0.3 seconds after all coroutines have f
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-09-17 16:46 Bomberman HowTo - Final Project\.vs\
目录 0 2017-09-17 16:46 Bomberman HowTo - Final Project\.vs\Bomberman HowTo - Final Project\
目录 0 2017-09-17 16:47 Bomberman HowTo - Final Project\.vs\Bomberman HowTo - Final Project\v15\
文件 33792 2017-09-17 16:47 Bomberman HowTo - Final Project\.vs\Bomberman HowTo - Final Project\v15\.suo
目录 0 2017-09-17 16:46 Bomberman HowTo - Final Project\.vs\Bomberman HowTo - Final Project\v15\sqlite3\
文件 569344 2017-09-17 16:46 Bomberman HowTo - Final Project\.vs\Bomberman HowTo - Final Project\v15\sqlite3\storage.ide
目录 0 2017-09-10 12:53 Bomberman HowTo - Final Project\Assets\
文件 8196 2016-04-10 03:35 Bomberman HowTo - Final Project\Assets\.DS_Store
文件 192 2016-02-02 03:54 Bomberman HowTo - Final Project\Assets\Animation Controllers.me
目录 0 2017-09-10 12:53 Bomberman HowTo - Final Project\Assets\Animation Controllers\
文件 8936 2016-02-02 04:12 Bomberman HowTo - Final Project\Assets\Animation Controllers\Pla
文件 180 2016-02-02 03:54 Bomberman HowTo - Final Project\Assets\Animation Controllers\Pla
文件 192 2016-01-25 23:53 Bomberman HowTo - Final Project\Assets\Materials.me
目录 0 2017-09-10 12:53 Bomberman HowTo - Final Project\Assets\Materials\
文件 4972 2016-01-26 00:30 Bomberman HowTo - Final Project\Assets\Materials\Block.mat
文件 180 2016-01-25 23:53 Bomberman HowTo - Final Project\Assets\Materials\Block.mat.me
文件 192 2016-01-25 23:44 Bomberman HowTo - Final Project\Assets\Models.me
目录 0 2017-09-10 12:53 Bomberman HowTo - Final Project\Assets\Models\
文件 34236 2015-09-02 03:36 Bomberman HowTo - Final Project\Assets\Models\Bomb.fbx
文件 1803 2016-01-26 00:01 Bomberman HowTo - Final Project\Assets\Models\Bomb.fbx.me
文件 22076 2016-02-01 18:43 Bomberman HowTo - Final Project\Assets\Models\Floor.obj
文件 1840 2016-02-01 18:44 Bomberman HowTo - Final Project\Assets\Models\Floor.obj.me
文件 192 2016-01-25 23:44 Bomberman HowTo - Final Project\Assets\Models\Materials.me
目录 0 2017-09-10 12:53 Bomberman HowTo - Final Project\Assets\Models\Materials\
文件 4888 2016-01-26 00:51 Bomberman HowTo - Final Project\Assets\Models\Materials\Bomb.mat
文件 180 2016-01-26 00:01 Bomberman HowTo - Final Project\Assets\Models\Materials\Bomb.mat.me
文件 4892 2016-01-26 00:04 Bomberman HowTo - Final Project\Assets\Models\Materials\BombRope.mat
文件 180 2016-01-26 00:01 Bomberman HowTo - Final Project\Assets\Models\Materials\BombRope.mat.me
文件 4892 2016-01-25 23:52 Bomberman HowTo - Final Project\Assets\Models\Materials\Color1.mat
文件 180 2016-01-25 23:44 Bomberman HowTo - Final Project\Assets\Models\Materials\Color1.mat.me
文件 4892 2016-01-25 23:52 Bomberman HowTo - Final Project\Assets\Models\Materials\Color2.mat
............此处省略76个文件信息
相关资源
- du3ds.rar
- Unity3D视频转换器TheoraConverter.NET+1.1+
- ShaderForge 1.26
- 基于Unity2017.3.0f3的音乐节拍demo
- 5款Unity3D制作的小游戏,新手必备看评
- 常用字体库大全
- Unity3D Highlighting System 5.0
- Unity结合Kinect2体感开发:KinectForWind
- u3d入门练习
- u3d做的赛车游戏,亲测有效
- unity推箱子完整项目源码
- u3d贪吃蛇VS方块
- unity3d游戏框架消息机制
- Pocket+RPG+Weapon+Trails+武器拖尾效果(
- Unity3D挥剑(剑痕特效)
- U3D之WebCamTexture实现前后相机的拍照功
- U3D与OBJ互转
- U3D从入门到精通PDF和资源文件
- glu3d 3dmax流体插件
- C4DtoUnity
- Unity3D实现的角色攻击、移动待机死亡
- Unity3D给力材质包
- Unity 烟花特效
- UMP Pro Win Mac Linux WebGL 2.0.3.unitypackage
- unity3d材质球大全合集
- 撑杆过河,u3d益智小游戏
- 我的博客制作的乒乓球游戏
- Final IK 1.8 最新版
- u3d 十几种比较好看的字体
- VRTK.unitypackage
评论
共有 条评论