资源简介
unity3d俄罗斯方块源码,unity3d版本5.4.3f1,代码兼容高版本,素材预设物在高版本可能失效,下载请慎重!!!
注:提供高版本2018.2.14f1转换,如有需要或疑问请邮箱联系
代码片段和文件信息
using UnityEngine;
using System.Collections;
public class AudioManager : MonoBehaviour {
///
/// 点击音效
///
AudioClip cursor { get; set; }
///
/// 放置音效
///
AudioClip balloon { get; set; }
///
/// 下落音效
///
AudioClip drop { get; set; }
///
/// 消除音效
///
AudioClip lineclear { get; set; }
///
/// 结束音效
///
AudioClip gameover { get; set; }
AudioSource audioSource1 { get; set; }
AudioSource audioSource2 { get; set; }
///
/// 单例模式
///
public static AudioManager instance;
private void Awake()
{
instance = this;
audioSource1 = Gameobject.Find(“Main Camera“).GetComponent();
audioSource2 = Gameobject.Find(“Canvas“).GetComponent();
cursor = Resources.Load(“Audio/Cursor“);
balloon = Resources.Load(“Audio/Balloon“);
drop = Resources.Load(“Audio/Drop“);
lineclear = Resources.Load(“Audio/Lineclear“);
gameover = Resources.Load(“Audio/Gameover“);
}
public void SetAudioSource(bool iscan = true) {
audioSource1.enabled = audioSource2.enabled = iscan;
}
///
/// 点击音效
///
public void PlayCursor()
{
PlayAudio2(cursor);
}
///
/// 下落音效
///
public void PlayDrop()
{
PlayAudio1(drop);
}
///
/// 放置音效
///
public void PlayControl()
{
PlayAudio2(balloon);
}
///
/// 消除音效
///
public void PlayLineClear()
{
PlayAudio2(lineclear);
}
///
/// 结束音效
///
public void PlayGameOver() {
PlayAudio2(gameover);
}
///
/// 播放音效
///
/// 音效源
void PlayAudio1(AudioClip clip)
{
audioSource1.clip = clip;
audioSource1.Play();
//audioSource1.Pause();
}
void PlayAudio2(AudioClip clip)
{
audioSource2.clip = clip;
audioSource2.Play();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-03-16 19:14 Tetris_By_YeXiao\
目录 0 2019-03-06 10:42 Tetris_By_YeXiao\.vs\
目录 0 2019-03-06 10:42 Tetris_By_YeXiao\.vs\Tetris_By_YeXiao\
目录 0 2019-03-06 11:08 Tetris_By_YeXiao\.vs\Tetris_By_YeXiao\v14\
文件 123904 2019-03-16 20:56 Tetris_By_YeXiao\.vs\Tetris_By_YeXiao\v14\.suo
目录 0 2019-03-16 18:58 Tetris_By_YeXiao\Assets\
目录 0 2019-03-07 12:58 Tetris_By_YeXiao\Assets\Animation\
文件 191 2019-03-06 12:10 Tetris_By_YeXiao\Assets\Animation.me
文件 10732 2019-03-06 16:11 Tetris_By_YeXiao\Assets\Animation\BtnGroupUp.anim
文件 179 2019-03-06 16:07 Tetris_By_YeXiao\Assets\Animation\BtnGroupUp.anim.me
文件 10732 2019-03-07 12:58 Tetris_By_YeXiao\Assets\Animation\BtnGroupUp1.anim
文件 179 2019-03-07 12:57 Tetris_By_YeXiao\Assets\Animation\BtnGroupUp1.anim.me
文件 7056 2019-03-07 12:58 Tetris_By_YeXiao\Assets\Animation\ButtonGroup 1.controller
文件 179 2019-03-07 12:57 Tetris_By_YeXiao\Assets\Animation\ButtonGroup 1.controller.me
文件 7048 2019-03-06 16:09 Tetris_By_YeXiao\Assets\Animation\ButtonGroup.controller
文件 179 2019-03-06 16:07 Tetris_By_YeXiao\Assets\Animation\ButtonGroup.controller.me
文件 10736 2019-03-06 16:11 Tetris_By_YeXiao\Assets\Animation\ti
文件 179 2019-03-06 16:05 Tetris_By_YeXiao\Assets\Animation\ti
文件 7048 2019-03-06 16:09 Tetris_By_YeXiao\Assets\Animation\Txt_ti
文件 179 2019-03-06 16:05 Tetris_By_YeXiao\Assets\Animation\Txt_ti
目录 0 2019-03-05 18:02 Tetris_By_YeXiao\Assets\Fonts\
文件 191 2019-03-05 18:02 Tetris_By_YeXiao\Assets\Fonts.me
文件 159112 2016-10-11 10:23 Tetris_By_YeXiao\Assets\Fonts\eurof55.ttf
文件 500 2018-12-23 15:57 Tetris_By_YeXiao\Assets\Fonts\eurof55.ttf.me
文件 9720284 2000-05-18 14:30 Tetris_By_YeXiao\Assets\Fonts\方正粗圆_GBK.ttf
文件 502 2018-12-23 15:57 Tetris_By_YeXiao\Assets\Fonts\方正粗圆_GBK.ttf.me
目录 0 2019-03-07 10:52 Tetris_By_YeXiao\Assets\Resources\
文件 191 2019-03-05 18:02 Tetris_By_YeXiao\Assets\Resources.me
目录 0 2019-03-07 11:01 Tetris_By_YeXiao\Assets\Resources\Audio\
文件 191 2019-03-07 10:52 Tetris_By_YeXiao\Assets\Resources\Audio.me
文件 561952 2016-10-11 10:23 Tetris_By_YeXiao\Assets\Resources\Audio\Balloon.wav
............此处省略2891个文件信息
相关资源
- UnityVR手势识别插件VR Infinite Gesture1.
- Unity 2017 Game AI Programming(3rd) 无水印
- unity的Navigation寻路完整的.
- Unity着色器和屏幕特效开发秘籍 中文
- Siliphen的2048游戏demo
- Unity塔防游戏
- 最全的FPGA俄罗斯方块包含5个版本的完
- SpaceShooter资源包
- steamcommunity
- Unity 插件,EasyTouch 5
- cocos2dx 3.4 俄罗斯方块 源代码及运行文
- astah-community_7.2.0.1ff236-0_all.deb
- Unity vs2012插件
- 一个超级真实的unity水资源
- Realistic Car HD 02 1.0.7z.baiduyun
- Unity中文文档2020.1.rar
- Easy Touch 5.X
- unity2017 可用Easytouch 5.0.17.unitypackage
- Unity3D 基于红绿眼镜的3d
- Dlib FaceLandmark Detector 1.2.8.rar
- 基于unity的fps游戏.rar
- Final IK 1.8 最新版
- 真实汽车模拟
- VRTK.unitypackage
- unity3D实现小车移动、发射炮弹.zip
- 游戏粒子特效.zip
- unity3D宝石三消手机游戏完整源码
- facebook-unity-sdk-7.15.1.unitypackage
- Terrain Slicing Dynamic Loading Kit V4.4.0.uni
- 地形分割、动态加载 Terrain Slicing Dy
评论
共有 条评论