⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 snd_chatterbox.lua

📁 这是整套横扫千军3D版游戏的源码
💻 LUA
字号:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------  file:    snd_chatterbox.lua--  brief:   annoys sounds--  author:  Dave Rodgers----  Copyright (C) 2007.--  Licensed under the terms of the GNU GPL, v2 or later.------------------------------------------------------------------------------------------------------------------------------------------------------------------function widget:GetInfo()  return {    name      = "ChatterBox",    desc      = "Annoying sounds",    author    = "trepan",    date      = "Jan 9, 2007",    license   = "GNU GPL, v2 or later",    layer     = -10,    enabled   = false  --  loaded by default?  }end----------------------------------------------------------------------------------------------------------------------------------------------------------------local SOUND_DIRNAME = LUAUI_DIRNAME .. 'Sounds/'local function playSound(filename, ...)  Spring.PlaySoundFile(SOUND_DIRNAME .. filename, unpack(arg))end--------------------------------------------------------------------------------function widget:KeyPress(key, mods, isRepeat)  if (not isRepeat) then    playSound('flag_grab.wav')  else    playSound('land.wav', 0.4)  end  return falseend--[[function widget:KeyRelease(key, mods)  playSound('flag_grab.wav')  return falseend--]]function widget:MousePress(x, y, button)  if     (button == 1) then playSound('pop.wav')  elseif (button == 2) then playSound('message_admin.wav')  elseif (button == 3) then playSound('bounce.wav')  end  return falseendfunction widget:UnitFinished(unitID, unitDefID, unitTeam)  if (unitTeam == Spring.GetMyTeamID()) then    playSound('teamgrab.wav')  endend----------------------------------------------------------------------------------------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -