text stringlengths 13 6.01M |
|---|
using Nac.Wpf.Common;
using Nac.Wpf.UI;
using System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using static NacWpfGlobal;
namespace NacXbapHost {
/// <summary>
/// Interaction logic for Page1.xaml
/// </summary>
public partial class Page1 : Page
{
public Page1()
{
InitializeComponent();
}
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
MessageBox.Show(e.ExceptionObject.ToString(), "CurrentDomain_UnhandledException");
}
private void Page_Loaded(object sender, RoutedEventArgs e) {
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
NacSecurity.Off = true;
NacWpfContext.Create();
G.AddEngine(new NacWpfEngine("offline"));
//Parser.Run(Environment.GetCommandLineArgs().Skip(1).ToArray(), this);
//context.AddEngine(new NacWpfEngine("127.0.0.1")); //temp
//context.AddEngine(new NacWpfEngine("203.15.179.7")); //temp
DataContext = G;
Main2 main = new Main2();
Content = main;
}
private void Page_Unloaded(object sender, RoutedEventArgs e) {
NacWpfContext.Destroy();
}
}
}
|
using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;//Please add references
namespace ITCastOCSS.DAL
{
/// <summary>
/// 数据访问类:Teaching
/// </summary>
public partial class Teaching
{
public Teaching()
{}
#region BasicMethod
/// <summary>
/// 得到最大ID
/// </summary>
public int GetMaxId()
{
return DbHelperSQL.GetMaxID("ID", "Teaching");
}
/// <summary>
/// 是否存在该记录
/// </summary>
public bool Exists(int ID)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select count(1) from Teaching");
strSql.Append(" where ID=@ID");
SqlParameter[] parameters = {
new SqlParameter("@ID", SqlDbType.Int,4)
};
parameters[0].Value = ID;
return DbHelperSQL.Exists(strSql.ToString(),parameters);
}
/// <summary>
/// 增加一条数据
/// </summary>
public int Add(ITCastOCSS.Model.Teaching model)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("insert into Teaching(");
strSql.Append("TID,CID,Week,Timeperiod,Place,MaxNum,ActualNum)");
strSql.Append(" values (");
strSql.Append("@TID,@CID,@Week,@Timeperiod,@Place,@MaxNum,@ActualNum)");
strSql.Append(";select @@IDENTITY");
SqlParameter[] parameters = {
new SqlParameter("@TID", SqlDbType.Int,4),
new SqlParameter("@CID", SqlDbType.Int,4),
new SqlParameter("@Week", SqlDbType.NVarChar,20),
new SqlParameter("@Timeperiod", SqlDbType.NVarChar,20),
new SqlParameter("@Place", SqlDbType.NVarChar,20),
new SqlParameter("@MaxNum", SqlDbType.Int,4),
new SqlParameter("@ActualNum", SqlDbType.Int,4)};
parameters[0].Value = model.TID;
parameters[1].Value = model.CID;
parameters[2].Value = model.Week;
parameters[3].Value = model.Timeperiod;
parameters[4].Value = model.Place;
parameters[5].Value = model.MaxNum;
parameters[6].Value = model.ActualNum;
object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新一条数据
/// </summary>
public bool Update(ITCastOCSS.Model.Teaching model)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("update Teaching set ");
strSql.Append("TID=@TID,");
strSql.Append("CID=@CID,");
strSql.Append("Week=@Week,");
strSql.Append("Timeperiod=@Timeperiod,");
strSql.Append("Place=@Place,");
strSql.Append("MaxNum=@MaxNum,");
strSql.Append("ActualNum=@ActualNum");
strSql.Append(" where ID=@ID");
SqlParameter[] parameters = {
new SqlParameter("@TID", SqlDbType.Int,4),
new SqlParameter("@CID", SqlDbType.Int,4),
new SqlParameter("@Week", SqlDbType.NVarChar,20),
new SqlParameter("@Timeperiod", SqlDbType.NVarChar,20),
new SqlParameter("@Place", SqlDbType.NVarChar,20),
new SqlParameter("@MaxNum", SqlDbType.Int,4),
new SqlParameter("@ActualNum", SqlDbType.Int,4),
new SqlParameter("@ID", SqlDbType.Int,4)};
parameters[0].Value = model.TID;
parameters[1].Value = model.CID;
parameters[2].Value = model.Week;
parameters[3].Value = model.Timeperiod;
parameters[4].Value = model.Place;
parameters[5].Value = model.MaxNum;
parameters[6].Value = model.ActualNum;
parameters[7].Value = model.ID;
int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
if (rows > 0)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 删除一条数据
/// </summary>
public bool Delete(int ID)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("delete from Teaching ");
strSql.Append(" where ID=@ID");
SqlParameter[] parameters = {
new SqlParameter("@ID", SqlDbType.Int,4)
};
parameters[0].Value = ID;
int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
if (rows > 0)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 批量删除数据
/// </summary>
public bool DeleteList(string IDlist )
{
StringBuilder strSql=new StringBuilder();
strSql.Append("delete from Teaching ");
strSql.Append(" where ID in ("+IDlist + ") ");
int rows=DbHelperSQL.ExecuteSql(strSql.ToString());
if (rows > 0)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public ITCastOCSS.Model.Teaching GetModel(int ID)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select top 1 ID,TID,CID,Week,Timeperiod,Place,MaxNum,ActualNum from Teaching ");
strSql.Append(" where ID=@ID");
SqlParameter[] parameters = {
new SqlParameter("@ID", SqlDbType.Int,4)
};
parameters[0].Value = ID;
ITCastOCSS.Model.Teaching model=new ITCastOCSS.Model.Teaching();
DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
if(ds.Tables[0].Rows.Count>0)
{
return DataRowToModel(ds.Tables[0].Rows[0]);
}
else
{
return null;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public ITCastOCSS.Model.Teaching DataRowToModel(DataRow row)
{
ITCastOCSS.Model.Teaching model=new ITCastOCSS.Model.Teaching();
if (row != null)
{
if(row["ID"]!=null && row["ID"].ToString()!="")
{
model.ID=int.Parse(row["ID"].ToString());
}
if(row["TID"]!=null && row["TID"].ToString()!="")
{
model.TID=int.Parse(row["TID"].ToString());
}
if(row["CID"]!=null && row["CID"].ToString()!="")
{
model.CID=int.Parse(row["CID"].ToString());
}
if(row["Week"]!=null)
{
model.Week=row["Week"].ToString();
}
if(row["Timeperiod"]!=null)
{
model.Timeperiod=row["Timeperiod"].ToString();
}
if(row["Place"]!=null)
{
model.Place=row["Place"].ToString();
}
if(row["MaxNum"]!=null && row["MaxNum"].ToString()!="")
{
model.MaxNum=int.Parse(row["MaxNum"].ToString());
}
if(row["ActualNum"]!=null && row["ActualNum"].ToString()!="")
{
model.ActualNum=int.Parse(row["ActualNum"].ToString());
}
}
return model;
}
/// <summary>
/// 获得数据列表
/// </summary>
public DataSet GetList(string strWhere)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select ID,TID,CID,Week,Timeperiod,Place,MaxNum,ActualNum ");
strSql.Append(" FROM Teaching ");
if(strWhere.Trim()!="")
{
strSql.Append(" where "+strWhere);
}
return DbHelperSQL.Query(strSql.ToString());
}
/// <summary>
/// 获得前几行数据
/// </summary>
public DataSet GetList(int Top,string strWhere,string filedOrder)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select ");
if(Top>0)
{
strSql.Append(" top "+Top.ToString());
}
strSql.Append(" ID,TID,CID,Week,Timeperiod,Place,MaxNum,ActualNum ");
strSql.Append(" FROM Teaching ");
if(strWhere.Trim()!="")
{
strSql.Append(" where "+strWhere);
}
strSql.Append(" order by " + filedOrder);
return DbHelperSQL.Query(strSql.ToString());
}
/// <summary>
/// 获取记录总数
/// </summary>
public int GetRecordCount(string strWhere)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select count(1) FROM Teaching ");
if(strWhere.Trim()!="")
{
strSql.Append(" where "+strWhere);
}
object obj = DbHelperSQL.GetSingle(strSql.ToString());
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 分页获取数据列表
/// </summary>
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("SELECT * FROM ( ");
strSql.Append(" SELECT ROW_NUMBER() OVER (");
if (!string.IsNullOrEmpty(orderby.Trim()))
{
strSql.Append("order by T." + orderby );
}
else
{
strSql.Append("order by T.ID desc");
}
strSql.Append(")AS Row, T.* from Teaching T ");
if (!string.IsNullOrEmpty(strWhere.Trim()))
{
strSql.Append(" WHERE " + strWhere);
}
strSql.Append(" ) TT");
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
return DbHelperSQL.Query(strSql.ToString());
}
/*
/// <summary>
/// 分页获取数据列表
/// </summary>
public DataSet GetList(int PageSize,int PageIndex,string strWhere)
{
SqlParameter[] parameters = {
new SqlParameter("@tblName", SqlDbType.VarChar, 255),
new SqlParameter("@fldName", SqlDbType.VarChar, 255),
new SqlParameter("@PageSize", SqlDbType.Int),
new SqlParameter("@PageIndex", SqlDbType.Int),
new SqlParameter("@IsReCount", SqlDbType.Bit),
new SqlParameter("@OrderType", SqlDbType.Bit),
new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
};
parameters[0].Value = "Teaching";
parameters[1].Value = "ID";
parameters[2].Value = PageSize;
parameters[3].Value = PageIndex;
parameters[4].Value = 0;
parameters[5].Value = 0;
parameters[6].Value = strWhere;
return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
}*/
#endregion BasicMethod
#region ExtensionMethod
#endregion ExtensionMethod
}
}
|
using UnityEngine;
public class PlayerController : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
var movement = new Vector3(0, 0, 0);
if (Input.GetKey(KeyCode.LeftArrow))
{
movement += new Vector3(-2, 0, 0);
}
if (Input.GetKey(KeyCode.UpArrow))
{
movement += new Vector3(0, 0, -2);
}
if (Input.GetKey(KeyCode.RightArrow))
{
movement += new Vector3(2, 0, 0);
}
if (Input.GetKey(KeyCode.DownArrow))
{
movement += new Vector3(0, 0, 2);
}
if (Input.GetKeyDown(KeyCode.Space))
{
movement.Scale(new Vector3(18, 0, 10));
}
this.GetComponent<Rigidbody>().AddForce(movement, ForceMode.Impulse);
}
}
|
using CalculatorService.Domain.Models;
using System.Linq;
using System.Threading.Tasks;
namespace CalculatorService.Domain.Operation
{
public class SumService : IOperationService<SumParams, IntResult>
{
public Task<IntResult> Execute(SumParams parameters) => Task.FromResult(new IntResult() { Result = parameters.Addends.Sum() });
public string GetDescription(SumParams parameters, IntResult intResult) => $"{string.Join(" + ", parameters.Addends)} = {intResult.Result}";
}
} |
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using RestLogger.Infrastructure;
namespace RestLogger.Storage
{
public class RepositoryBase<T> : IRepository<T>
where T : class
{
private DbContext _dbContext = null;
private readonly IDatabaseFactory _databaseFactory;
public RepositoryBase(IDatabaseFactory databaseFactory)
{
_databaseFactory = databaseFactory;
}
public void Add(T item)
{
DbContext.Set<T>().Add(item);
}
public void Delete(T item)
{
DbContext.Set<T>().Remove(item);
}
public T Get(Expression<Func<T, bool>> where)
{
T item = TryGet(where);
if (item == null)
{
throw new ArgumentOutOfRangeException($"{typeof(T).Name} item satisfying expression '{where}' not found.");
}
return item;
}
public T TryGet(Expression<Func<T, bool>> where)
{
return DbContext.Set<T>().Where(where).SingleOrDefault();
}
public async Task<T> TryGetAsync(Expression<Func<T, bool>> where)
{
return await DbContext.Set<T>().Where(where).SingleOrDefaultAsync();
}
public IEnumerable<T> GetAll()
{
return DbContext.Set<T>().ToList();
}
public T GetById(object id)
{
T item = TryGetById(id);
if (item == null)
{
throw new ArgumentOutOfRangeException($"{typeof(T).Name} item with Id {id} not found.");
}
return item;
}
public T TryGetById(object id)
{
return DbContext.Set<T>().Find(id);
}
public async Task<T> TryGetByIdAsync(object id)
{
return await DbContext.Set<T>().FindAsync(id);
}
public IEnumerable<T> GetMany(Expression<Func<T, bool>> where)
{
return DbContext.Set<T>().Where(where).ToList();
}
public void Update(T item)
{
DbContext.Set<T>().Attach(item);
DbContext.Entry(item).State = EntityState.Modified;
}
protected DbContext DbContext
{
get
{
if (_dbContext == null)
{
_dbContext = _databaseFactory.GetDbContext();
}
return _dbContext;
}
}
}
}
|
using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankCommunicationFront
{
/// <summary>
/// 输入定时处理任务数据集合
/// </summary>
public class InPutTaskWaitingDone
{
/// <summary>
/// pk
/// </summary>
public ObjectId _id { get; set; }
/// <summary>
/// 两位十进制数字字符串唯一确定一家银行
/// </summary>
public string BankTag { get; set; }
/// <summary>
/// 交易类型
/// 2001:记账金客户转账数据
/// 2002:记账保证金客户转账数据
/// 2009:委托扣款协议信息
/// 2011:保证金补缴程序信息
/// </summary>
public int TransType { get; set; }
/// <summary>
/// 库名
/// </summary>
public string DbName { get; set; }
/// <summary>
/// 集合名
/// </summary>
public string ColName { get; set; }
/// <summary>
/// 文件名(不含路径)
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 1:已同步到核心(终态)
/// 0:文件已入中间库待同步到核心
/// -1:ftp下载文件失败(文件不存在/ftp服务器通信失败等原因)
/// -2:解密文件失败
/// -3:校验文件失败
/// -4:其他错误原因
/// </summary>
public int Status { get; set; }
/// <summary>
/// 记录创建时刻
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 备注信息
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 加解密密钥
/// </summary>
public string Key { get; set; }
/// <summary>
/// 扣款成功数量
/// </summary>
public int SuccessNum { get; set; }
/// <summary>
/// 扣款成功金额(分)
/// </summary>
public long SuccessAmount { get; set; }
/// <summary>
/// 扣款失败数量
/// </summary>
public int FailNum { get; set; }
/// <summary>
/// 扣款失败金额(分)
/// </summary>
public long FailAmount { get; set; }
}
/// <summary>
/// 输出定时处理任务数据集合
/// </summary>
public class OutPutTaskWaitingDone
{
/// <summary>
/// PK
/// </summary>
public ObjectId _id { get; set; }
/// <summary>
/// 两位十进制数字字符串唯一确定一家银行
/// </summary>
public string BankTag { get; set; }
/// <summary>
/// 交易类型
/// 2001:记账金客户转账数据
/// 2002:记账保证金客户转账数据
/// 2010:解约信息
/// </summary>
public int TransType { get; set; }
/// <summary>
/// 当TRANSTYPE为2001时本字段为0代表T-1日的未扣款交易;为1代表T-1日之前的未扣款交易和银行扣款失败交易
/// </summary>
public int PriorityLevel { get; set; }
/// <summary>
/// 库名
/// </summary>
public string DbName { get; set; }
/// <summary>
/// 集合名
/// </summary>
public string ColName { get; set; }
/// <summary>
/// 文件名(不含路径)
/// </summary>
public string FileName { get; set; }
/// <summary>
/// 1:文件已上传到ftp(终态)
/// 0:中间数据已生成,待ftp发送
/// -1:文件生成失败
/// -2:上传ftp失败
/// </summary>
public int Status { get; set; }
/// <summary>
/// 文件上传ftp时刻
/// </summary>
public DateTime SendTime { get; set; }
/// <summary>
/// 记录创建时刻
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 备注信息
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 加解密密钥
/// </summary>
public string Key { get; set; }
/// <summary>
/// 待扣款总笔数
/// </summary>
public int TotalNum { get; set; }
/// <summary>
/// 待扣款总金额(分)
/// </summary>
public long TotalAmount { get; set; }
}
/// <summary>
/// 异常任务集合
/// </summary>
public class ExceptionTaskWaitingDone : InPutTaskWaitingDone
{
public string OperationType { get; set; }
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
namespace Exercise_7
{
class Program
{
static void Main(string[] args)
{
//string input = Console.ReadLine().Replace(" ", string.Empty);
List<string> input2 = Console.ReadLine().Split('|').ToList();
List<string> newList = new List<string>();
for (int i = input2.Count - 1; i >= 0; i--)
{
string temp = input2[i];
List<string> list2 = temp.Split(' ', StringSplitOptions.RemoveEmptyEntries).ToList();
newList.AddRange(list2);
}
Console.WriteLine(string.Join(" ", newList));
//List<int> indexes = new List<int>();
//int start = 0;
//int at = 0;
//while (start < input.Length)
//{
// at = input.IndexOf('|', start);
// if (at == -1)
// {
// break;
// }
// indexes.Add(at);
// Console.WriteLine(at);
// start = at + 1;
//}
//Console.WriteLine(string.Join(" ", indexes));
}
}
}
|
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using StardewValley;
using SObject = StardewValley.Object;
namespace RangeDisplay.RangeHandling.RangeCreators.Objects
{
internal class BeeHouseRangeCreator : IObjectRangeCreator
{
public RangeItem HandledRangeItem => RangeItem.Bee_House;
public bool CanHandle(SObject obj)
{
return obj.name.ToLower().Contains("bee house");
}
public IEnumerable<Vector2> GetRange(SObject obj, Vector2 position, GameLocation location)
{
for (int i = -5; i < 6; i++)
for (int j = -4; j < 5; j++)
if (Math.Abs(i) + Math.Abs(j) < 6)
yield return new Vector2(position.X + i, position.Y + j);
}
}
} |
using System.Collections;
using HTB.Database;
namespace HTBExtras.XML
{
public class XmlLoginRecord : Record
{
public string UserId { get; set; }
public string UserFirstName { get; set; }
public string UserLastName { get; set; }
public ArrayList Roads { get; set; }
public XmlLoginRecord()
{
Roads = new ArrayList();
}
public XmlLoginRecord(tblUser user)
{
Roads = new ArrayList();
Assign(user);
}
public void Assign(tblUser user)
{
UserId = user.UserID.ToString();
UserFirstName = user.UserVorname;
UserLastName = user.UserNachname;
}
}
}
|
using UnityEngine;
public class GameManager : Singleton<GameManager>
{
/// <summary>
/// スコア
/// </summary>
public int Score { get; private set; }
private void Update()
{
Score++;
}
}
|
namespace iSukces.Code
{
/*
public class CodeWriter : ICodeWriter
{
public void AppendText(string text)
{
_sb.Append(text);
}
public string GetCode()
{
return _sb.ToString();
}
public void Save(string filename)
{
var code = ToString();
if (File.Exists(filename))
{
var currentCode = Encoding.UTF8.GetString(File.ReadAllBytes(filename));
if (currentCode == code) return;
}
File.WriteAllBytes(filename, Encoding.UTF8.GetBytes(code));
}
public override string ToString()
{
return _sb.ToString();
}
private void AddIndent()
{
if (Indent > 0)
_sb.Append(new string(' ', Indent * 4));
}
public int Indent { get; set; }
private readonly StringBuilder _sb = new StringBuilder();
}
*/
} |
using UnityEngine;
using System.Collections;
public class LevelChunk : MonoBehaviour {
public Vector2 chunkIndex = new Vector2(0,0);
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Noesis.Javascript;
using CommonQ;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
using Newtonsoft.Json.Linq;
using System.Security.Cryptography;
namespace PwcTool
{
class GuessWorker
{
const string url_qrcode = "https://passport.tiancity.com/handler/getqrcodekey.ashx?";
const string url_capcheck = "http://captcha.tiancity.com/CheckSwitch.ashx?jsoncallback=j";
const string url_capimage = "http://captcha.tiancity.com/client.ashx?fid=104&code=1";
const string url_matcheck = "https://passport.tiancity.com/handler/GetMatrix.ashx?jsoncallback=?";
const string url_matsms = "https://passport.tiancity.com/handler/GetSmsMatrix.ashx?jsoncallback=?";
const string url_dpwd = "https://passport.tiancity.com/handler/GetSmsDynamic.ashx?jsoncallback=?";
const string url_log = "https://passport.tiancity.com/Login.ashx?jsoncallback=?";
const string url_pmsg = "https://passport.tiancity.com/handler/PushLoginMsg.ashx?jsoncallback=?";
const string url_qrlog = "https://passport.tiancity.com/handler/QrCodeKeyLogin.ashx?jsoncallback=?";
const string url_aqjf = "http://aq.tiancity.com/Protect/ReopenedAccount";
static Random m_rgen = new Random(System.Environment.TickCount);
static JavascriptContext m_JsContext = new JavascriptContext();
static bool initJavascript = false;
CLogger m_logger;
public static string Uid = "";
public static string Matchinfo = "";
public static string DBpwd = "";
public static int KeepRunTime = 0;
public static int StartRunTime = 0;
public Dictionary<string, string> m_lgcaptcha;
public Dictionary<string, string> m_pwcaptcha;
public event Action<GuessWorker,string, string, string, int, int, int> FinishTask;
const string md5js = "cstc.js";
string m_safekey = "";
public bool IsWorking = false;
public object workArgument;
public int IpToken = 0;
string _uid;
string _pwd;
public GuessWorker(Dictionary<string, string> lg, Dictionary<string, string> pw, string safekey)
{
m_lgcaptcha = new Dictionary<string, string>(lg);
m_pwcaptcha = new Dictionary<string, string>(pw);
m_safekey = safekey;
m_logger = CLogger.FromFolder("log/log");
if (!initJavascript)
{
m_JsContext.Run(File.ReadAllText(md5js));
initJavascript = true;
}
}
public void BeginTask(string uid, string pwd, object obj,int iptoken)
{
IsWorking = true;
workArgument = obj;
IpToken = iptoken;
_uid = uid;
_pwd = pwd;
//m_has_idcard = false;
//m_YuE = 0;
//m_userpoint = 0;
try
{
m_logger.Debug("====Begin uid:" + uid + "this:" + this.GetHashCode());
string url = "http://passport.tiancity.com/login/login.aspx";
HttpWebRequest request = System.Net.WebRequest.Create(url) as HttpWebRequest;
request.ServicePoint.Expect100Continue = false;
request.Timeout = 1000 * 60;
request.ContentType = "application/x-www-form-urlencoded";
request.CookieContainer = new CookieContainer();
request.BeginGetResponse(new AsyncCallback(OnTryLoginCallBack_GetCookies), new Tuple<HttpWebRequest, string, string, string>(request, uid, pwd,""));
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnTryLoginCallBack_GetCookies(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<HttpWebRequest, string, string, string>;
HttpWebRequest request = tuple.Item1;
string uid = tuple.Item2;
string pwd = tuple.Item3;
string newpwd = tuple.Item4;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
CookieCollection cookies = response.Cookies;
response.Close();
HttpWebRequest next_request = System.Net.WebRequest.Create(url_capcheck + "&fid=104&uid=" + uid) as HttpWebRequest;
next_request.ServicePoint.Expect100Continue = false;
next_request.Timeout = 1000 * 60;
next_request.ContentType = "application/x-www-form-urlencoded";
next_request.CookieContainer = new CookieContainer(); ;
next_request.CookieContainer.Add(cookies);
next_request.BeginGetResponse(new AsyncCallback(OnTryLoginCallBack_CheckCaptcha), new Tuple<HttpWebRequest, string, string, string>(next_request, uid, pwd, newpwd));
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnTryLoginCallBack_CheckCaptcha(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<HttpWebRequest, string, string, string>;
HttpWebRequest request = tuple.Item1;
string uid = tuple.Item2;
string pwd = tuple.Item3;
string newpwd = tuple.Item4;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
AsyncRead(response.GetResponseStream(), new Action<byte[]>((buffer) =>
{
try
{
string s = System.Text.Encoding.UTF8.GetString(buffer);
response.Close();
string pattern = @"[^\(\)]+\(([^\(\)]+)\)";
Match mt = Regex.Match(s, pattern);
if (mt.Groups.Count == 2)
{
string recvJsonStr = mt.Groups[1].ToString();
JObject jsObj = JObject.Parse(recvJsonStr);
string r = jsObj["R"].ToString();
if (r == "1")
{
string captoken = Guid.NewGuid().ToString().Replace("-", "");
string image_url = url_capimage + "&uid=" + uid + "&tid=" + captoken + "&rnd=" + m_rgen.NextDouble() * 99999;
HttpWebRequest next_request = System.Net.WebRequest.Create(image_url) as HttpWebRequest;
next_request.ServicePoint.Expect100Continue = false;
next_request.Timeout = 1000 * 60;
next_request.ContentType = "application/x-www-form-urlencoded";
next_request.CookieContainer = request.CookieContainer;
next_request.BeginGetResponse(new AsyncCallback(OnTryLoginCallBack_GetCaptcha), new Tuple<HttpWebRequest, string, string, string, string>(next_request, uid, pwd, newpwd, captoken));
}
}
}
catch
{
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}));
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void AsyncRead(Stream stream, Action<byte[]> callback)
{
try
{
byte[] totalbuffer = null;
byte[] readbuffer = new byte[1024];
stream.BeginRead(readbuffer, 0, readbuffer.Length, new AsyncCallback(OnAsyncReadCallBack), new Tuple<Stream, byte[], byte[], Action<byte[]>>(
stream, readbuffer, totalbuffer, callback));
}
catch
{
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnAsyncReadCallBack(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<Stream, byte[], byte[], Action<byte[]>>;
Stream s = tuple.Item1;
byte[] readbuffer = tuple.Item2;
byte[] totalbuffer = tuple.Item3;
Action<byte[]> callback = tuple.Item4;
int recv = s.EndRead(ar);
if (recv > 0)
{
if (totalbuffer == null)
{
totalbuffer = new byte[recv];
Array.Copy(readbuffer, totalbuffer, recv);
}
else
{
byte[] tmpbuffer = new byte[recv + totalbuffer.Length];
Array.Copy(totalbuffer, 0, tmpbuffer, 0, totalbuffer.Length);
Array.Copy(readbuffer, 0, tmpbuffer, totalbuffer.Length, recv);
totalbuffer = tmpbuffer;
}
Array.Clear(readbuffer, 0, readbuffer.Length);
s.BeginRead(readbuffer, 0, readbuffer.Length, new AsyncCallback(OnAsyncReadCallBack), new Tuple<Stream, byte[], byte[], Action<byte[]>>(
s, readbuffer, totalbuffer, callback));
}
else
{
s.Close();
callback.Invoke(totalbuffer);
}
}
catch
{
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnTryLoginCallBack_GetCaptcha(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<HttpWebRequest, string, string, string, string>;
HttpWebRequest request = tuple.Item1;
string uid = tuple.Item2;
string pwd = tuple.Item3;
string newpwd = tuple.Item4;
string captoken = tuple.Item5;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
Stream s = response.GetResponseStream();
byte[] img_buf = new byte[1024 * 10];
s.BeginRead(img_buf, 0, img_buf.Length, new AsyncCallback(OnReadLoginCaptcha), new Tuple<Tuple<HttpWebRequest, string, string, string, string>, byte[],int,Stream >(
tuple, img_buf, 0, s));
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnReadLoginCaptcha(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<Tuple<HttpWebRequest, string, string, string, string>, byte[], int, Stream>;
byte[] img_buf = tuple.Item2;
int readbytes = tuple.Item3;
Stream s = tuple.Item4;
int nrecv = s.EndRead(ar);
if (nrecv > 0)
{
int offset = nrecv + readbytes;
s.BeginRead(img_buf, offset, img_buf.Length - offset, new AsyncCallback(OnReadLoginCaptcha), new Tuple<Tuple<HttpWebRequest, string, string, string, string>, byte[], int, Stream>(
tuple.Item1,img_buf,offset,s));
}
else
{
s.Close();
HttpWebRequest request = tuple.Item1.Item1;
string uid = tuple.Item1.Item2;
string pwd = tuple.Item1.Item3;
string newpwd = tuple.Item1.Item4;
string captoken = tuple.Item1.Item5;
MD5 md5 = new MD5CryptoServiceProvider();
byte[] md5_bytes = md5.ComputeHash(img_buf, 0, readbytes);
string md5_str = BitConverter.ToString(md5_bytes).Replace("-", "");
string old_md5_str = md5_str;
md5_str = cs_md5(md5_str + Uid);
md5_str = cs_md5(md5_str + Matchinfo + old_md5_str);
md5_str = cs_md5(md5_str + DBpwd + old_md5_str);
if (m_lgcaptcha.ContainsKey(md5_str))
{
string cap = m_lgcaptcha[md5_str];
HttpWebRequest next_request = System.Net.WebRequest.Create(url_matcheck + "&id=" + uid) as HttpWebRequest;
next_request.ServicePoint.Expect100Continue = false;
next_request.Timeout = 1000 * 60;
next_request.ContentType = "application/x-www-form-urlencoded";
next_request.CookieContainer = request.CookieContainer;
next_request.BeginGetResponse(new AsyncCallback(OnTryLoginCallBack_RsaKey), new Tuple<HttpWebRequest, string, string, string, string, string>(next_request, uid, pwd, newpwd, captoken, cap));
}
else
{
string newcaptoken = Guid.NewGuid().ToString().Replace("-", "");
string image_url = url_capimage + "&uid=" + uid + "&tid=" + newcaptoken + "&rnd=" + m_rgen.NextDouble() * 99999;
HttpWebRequest next_request = System.Net.WebRequest.Create(image_url) as HttpWebRequest;
next_request.ServicePoint.Expect100Continue = false;
next_request.Timeout = 1000 * 60;
next_request.ContentType = "application/x-www-form-urlencoded";
next_request.CookieContainer = request.CookieContainer;
next_request.BeginGetResponse(new AsyncCallback(OnTryLoginCallBack_GetCaptcha), new Tuple<HttpWebRequest, string, string, string, string>(next_request, uid, pwd, newpwd, newcaptoken));
}
}
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnTryLoginCallBack_RsaKey(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<HttpWebRequest, string, string, string, string, string>;
HttpWebRequest request = tuple.Item1;
string uid = tuple.Item2;
string pwd = tuple.Item3;
string newpwd = tuple.Item4;
string captoken = tuple.Item5;
string cap = tuple.Item6;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
AsyncRead(response.GetResponseStream(), new Action<byte[]>((buffer) =>{
try
{
string s = System.Text.Encoding.UTF8.GetString(buffer);
response.Close();
string pattern = @"[^\(\)]+\(([^\(\)]+)\)";
Match r = Regex.Match(s, pattern);
if (r.Groups.Count == 2)
{
string st = "281";
string fl = "";
string cp = cap + "#" + captoken;
string FCQ = "";
string recvJsonStr = r.Groups[1].ToString();
JObject jsObj = JObject.Parse(recvJsonStr);
string code = jsObj["code"].ToString();
string mt = jsObj["mt"].ToString();
string pm = jsObj["pm"].ToString();
string pk = jsObj["pk"].ToString();
string rsa = jsObj["rsa"].ToString();
if (code == "199" && rsa == "True")
{
string ei = "id=" + uid + "&pw=" + pwd + "&mt=" + mt + "<=" + 0;
lock (m_JsContext)
{
m_JsContext.SetParameter("ei", ei);
m_JsContext.SetParameter("pk", pk);
m_JsContext.SetParameter("pm", pm);
FCQ = (string)m_JsContext.Run("JiaMi(ei,pk,pm)");
m_JsContext.SetParameter("cp", cp);
cp = (string)m_JsContext.Run("encodeURIComponent(cp)");
}
string url = url_log + "&FCQ=" + FCQ + "&cp=" + cp + "&fl=" + fl + "&st=" + st;
HttpWebRequest next_request = System.Net.WebRequest.Create(url) as HttpWebRequest;
next_request.ServicePoint.Expect100Continue = false;
next_request.Timeout = 1000 * 60;
next_request.ContentType = "application/x-www-form-urlencoded";
next_request.CookieContainer = request.CookieContainer;
next_request.BeginGetResponse(new AsyncCallback(OnTryLoginCallBack_LoginRet), new Tuple<HttpWebRequest, string, string, string>(next_request, uid, pwd, newpwd));
}
else
{
TaskFinishInvoke(this, uid, pwd, "RsaKeyError:" + code);
}
}
}
catch
{
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}));
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnTryLoginCallBack_LoginRet(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<HttpWebRequest, string, string, string>;
HttpWebRequest request = tuple.Item1;
string uid = tuple.Item2;
string pwd = tuple.Item3;
string newpwd = tuple.Item4;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
AsyncRead(response.GetResponseStream(), new Action<byte[]>((buffer) =>
{
try
{
string s = System.Text.Encoding.UTF8.GetString(buffer);
response.Close();
string pattern = @"[^\(\)]+\(([^\(\)]+)\)";
Match r = Regex.Match(s, pattern);
if (r.Groups.Count == 2)
{
string recvJsonStr = r.Groups[1].ToString();
JObject jsObj = JObject.Parse(recvJsonStr);
string logRet = jsObj["code"].ToString();
if (logRet == "1")
{
m_logger.Debug("登录OK");
string url = "http://member.tiancity.com/User/IdInfoModify.aspx";
HttpWebRequest next_request = System.Net.WebRequest.Create(url) as HttpWebRequest;
next_request.ServicePoint.Expect100Continue = false;
next_request.Timeout = 1000 * 60;
next_request.ContentType = "application/x-www-form-urlencoded";
next_request.CookieContainer = new CookieContainer();
next_request.CookieContainer.Add(response.Cookies);
next_request.BeginGetResponse(new AsyncCallback(OnTryGetIsIdCardSafe), new Tuple<HttpWebRequest, string, string, string>(next_request, uid, pwd, newpwd));
}
else if (logRet == "7" || logRet == "6")
{
m_logger.Debug("ip被封");
TaskFinishInvoke(this, uid, pwd, "IP被封");
}
else if (logRet == "4")
{
m_logger.Info("uid:" + uid + "密码错误!");
TaskFinishInvoke(this, uid, pwd, "密码错误");
}
else
{
m_logger.Info("uid:" + uid + " 登录错误:" + logRet);
TaskFinishInvoke(this, uid, pwd, "登录错误:" + logRet);
}
}
}
catch
{
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}));
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnTryGetIsIdCardSafe(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<HttpWebRequest, string, string, string>;
HttpWebRequest request = tuple.Item1;
string uid = tuple.Item2;
string pwd = tuple.Item3;
string newpwd = tuple.Item4;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
StreamReader reader = new StreamReader(response.GetResponseStream(),Encoding.GetEncoding("GB2312"));
string s = reader.ReadToEnd();
response.Close();
reader.Close();
int has_idcard = 0;
int bt = System.Environment.TickCount;
string pattern = "[\\s\\S]*?真实姓名[\\s\\S]*?value=\"([^\"]*)\"";
Match mt = Regex.Match(s, pattern);
if (mt.Groups.Count == 2)
{
if (string.IsNullOrEmpty(mt.Groups[1].ToString()))
{
has_idcard = 1;
}
else
{
has_idcard = 2;
}
}
int et = System.Environment.TickCount;
if (et - bt > 200)
{
m_logger.Debug("OnTryGetIsIdCardSafe 超时{0}", (et - bt));
}
string url = "http://pay.tiancity.com/Wallet/UserService.aspx";
HttpWebRequest next_request = System.Net.WebRequest.Create(url) as HttpWebRequest;
next_request.ServicePoint.Expect100Continue = false;
next_request.Timeout = 1000 * 60;
next_request.ContentType = "application/x-www-form-urlencoded";
next_request.CookieContainer = request.CookieContainer;
next_request.BeginGetResponse(new AsyncCallback(OnTryGetYuEScore), new Tuple<HttpWebRequest, string, string, int>(next_request, uid, pwd, has_idcard));
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void OnTryGetYuEScore(IAsyncResult ar)
{
try
{
var tuple = ar.AsyncState as Tuple<HttpWebRequest, string, string, int>;
HttpWebRequest request = tuple.Item1;
string uid = tuple.Item2;
string pwd = tuple.Item3;
int has_idcard = tuple.Item4;
int YuE = -1;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(ar);
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding("GB2312"));
string s = reader.ReadToEnd();
response.Close();
reader.Close();
if (!String.IsNullOrEmpty(s))
{
string pattern = "可用余额[^0-9]*([0-9]+)点";
Match mt = Regex.Match(s, pattern);
if (mt.Groups.Count == 2)
{
YuE = int.Parse(mt.Groups[1].ToString());
}
}
TaskFinishInvoke(this, uid, pwd, "查询成功", has_idcard, YuE, -1);
}
catch (System.Exception ex)
{
m_logger.Error(ex.ToString());
TaskFinishInvoke(this, _uid, _pwd, "未知异常");
}
}
void TaskFinishInvoke(GuessWorker worker, string uid, string pwd, string ret,int has_idcard = 0,int yue = 0,int userpoint = 0)
{
if (FinishTask != null)
{
FinishTask.Invoke(worker, uid, pwd, ret, has_idcard, yue, userpoint);
}
}
public string Encrypt(string strPwd)
{
lock (m_JsContext)
{
m_JsContext.SetParameter("src", strPwd);
return (string)m_JsContext.Run("encry(src)");
}
}
public string cs_md5(string src)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] strbytes = Encoding.Default.GetBytes(src);
byte[] md5_bytes = md5.ComputeHash(strbytes, 0, strbytes.Length);
string md5_str = BitConverter.ToString(md5_bytes).Replace("-", "");
return md5_str;
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using SimpleJSON;
using System;
using OneSignalPush.MiniJSON;
public class AnotherBattle : MonoBehaviour {
public Text Status;
public Text confirming;
public GameObject[] people;
public GameObject warningInvitating,loading, ValidationError;
public string id = "";
int energyused=5;
string namaajak;
public string idajak;
void Start () {
#if !UNITY_EDITOR
OneSignal.SetLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.NONE);
OneSignal.StartInit("d1637280-1caa-4fbe-a688-a10c9bb36890")
.HandleNotificationReceived(HandleNotificationReceived)
.HandleNotificationOpened(HandleNotificationOpened)
.InFocusDisplaying(OneSignal.OSInFocusDisplayOption.None)
.EndInit();
OneSignal.IdsAvailable((userId, pushToken) => {
id = userId;
StartCoroutine (onCoroutine());
});
#endif
#if UNITY_EDITOR
id = "123456789";
StartCoroutine (onCoroutine());
#endif
}
private void HandleNotificationReceived(OSNotification notification) {
OSNotificationPayload payload = notification.payload;
string message = payload.body;
Dictionary<string, object> additionalData = payload.additionalData;
if (additionalData == null) {
Debug.Log ("[HandleNotificationReceived] Additional Data == null");
}
else {
var jsonString = JSON.Parse (Json.Serialize(additionalData) as string);
PlayerPrefs.SetString ("MultiBattle", jsonString["from"]);
if (int.Parse(jsonString["from"]) == 99) {
PlayerPrefs.SetInt ("pos", 2);
PlayerPrefs.SetString ("RoomName", jsonString ["room"]);
PlayerPrefs.SetString (Link.USER_2, PlayerPrefs.GetString(Link.FULL_NAME));
PlayerPrefs.SetString (Link.USER_1, jsonString ["full_name_people"]);
StartCoroutine (kurangEnergy ());
}
else {
if (PlayerPrefs.GetString(Link.INVITE_CLICK) != "TRUE") {
warningInvitating.SetActive (true);
warningInvitating.GetComponent<Warning> ().from = PlayerPrefs.GetString ("MultiBattle");
warningInvitating.GetComponent<Warning> ().idYangMengajak = jsonString["idYangMengajak"].ToString();
warningInvitating.GetComponent<Warning> ().namaYangMengajak = jsonString["namaYangMengajak"].ToString();
warningInvitating.transform.Find ("User").GetComponent<Text> ().text = warningInvitating.GetComponent<Warning> ().namaYangMengajak;
idajak = jsonString ["idYangMengajak"];
namaajak = jsonString ["namaYangMengajak"];
}
}
//confirming.text ="addtional data : "+Json.Serialize(additionalData) as string+"from : "+jsonString["from"]+"from2 : "+jsonString["from"].ToString()+"klik"+PlayerPrefs.GetString(Link.INVITE_CLICK);
}
}
public bool fromUnity = false;
public string RoomNameString = "";
public string name_2 = "";
public string name_1 = "";
void Update () {
if (fromUnity) {
fromUnity = false;
PlayerPrefs.SetInt ("pos", 2);
PlayerPrefs.SetString ("RoomName", RoomNameString);
PlayerPrefs.SetString (Link.USER_2, name_2);
PlayerPrefs.SetString (Link.USER_1, name_1);
StartCoroutine (kurangEnergy ());
}
}
public void HandleNotificationOpened(OSNotificationOpenedResult result) {
OSNotificationPayload payload = result.notification.payload;
string message = payload.body;
string actionID = result.action.actionID;
print("GameControllerExample:HandleNotificationOpened: " + message);
//id = "Notification opened with text: " + message;
Dictionary<string, object> additionalData = payload.additionalData;
// if (actionID != null) {
// OneSignal.IdsAvailable((userId, pushToken) => {
// id = "UserID:\n" + userId + "\n\nPushToken:\n" + pushToken;
// });
// }
}
IEnumerator Start2()
{
if (!Input.location.isEnabledByUser) {
yield break;
Status.text = "GPS Aktif";
} else {
Status.text = "";
}
Input.location.Start();
// Wait until service initializes
int maxWait = 20;
while (Input.location.status == LocationServiceStatus.Initializing && maxWait > 0)
{
yield return new WaitForSeconds(1);
maxWait--;
}
// Service didn't initialize in 20 seconds
if (maxWait < 1)
{
Debug.Log("Timed out");
yield break;
}
// Connection has failed
if (Input.location.status == LocationServiceStatus.Failed)
{
Debug.Log("Unable to determine device location");
yield break;
Status.text = "Can't Get Location";
}
else
{
StopCoroutine (findPeople ());
Status.text = "Location Detected";
PlayerPrefs.SetString (Link.LAT,Input.location.lastData.latitude.ToString());
PlayerPrefs.SetString (Link.LOT,Input.location.lastData.longitude.ToString ());
StartCoroutine (findPeople ());
}
// Stop service if there is no need to query location updates continuously
Input.location.Stop();
}
IEnumerator onCoroutine(){
while(true)
{
#if !UNITY_EDITOR
StartCoroutine (Start2());
#endif
#if UNITY_EDITOR
Debug.Log("FindPeople");
PlayerPrefs.SetString (Link.LAT,Input.location.lastData.latitude.ToString());
PlayerPrefs.SetString (Link.LOT,Input.location.lastData.longitude.ToString ());
StartCoroutine (findPeople ());
#endif
yield return new WaitForSeconds(2f);
}
}
public void OnAccept () {
StartCoroutine (AcceptInvited ());
}
private IEnumerator AcceptInvited ()
{
long milisecond = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
string room_invite = PlayerPrefs.GetString (Link.EMAIL) + "@" + milisecond.ToString ();
warningInvitating.SetActive (false);
string url = Link.url + "acceptBattle";
WWWForm form = new WWWForm ();
form.AddField ("MY_ID", PlayerPrefs.GetString(Link.ID));
form.AddField ("PEOPLE_ID", idajak);
//form.AddField ("ID_DEVICE", PlayerPrefs.GetString(Link.DEVICE_ID));
form.AddField ("ROOM", room_invite);
WWW www = new WWW(url,form);
yield return www;
if (www.error == null) {
var jsonString = JSON.Parse (www.text);
PlayerPrefs.SetInt ("pos", 1);
PlayerPrefs.SetString ("RoomName", room_invite);
PlayerPrefs.SetString (Link.USER_1, PlayerPrefs.GetString(Link.FULL_NAME));
PlayerPrefs.SetString (Link.USER_2, namaajak);
StartCoroutine (kurangEnergy ());
} else {
//lat.text = "gagal";
}
}
private IEnumerator findPeople ()
{
string url = Link.url + "findPeopleArround";
WWWForm form = new WWWForm ();
form.AddField (Link.ID, PlayerPrefs.GetString(Link.ID));
form.AddField (Link.LAT, PlayerPrefs.GetString(Link.LAT));
form.AddField (Link.LOT, PlayerPrefs.GetString(Link.LOT));
form.AddField (Link.FCM_ID, id);
form.AddField("DID", PlayerPrefs.GetString(Link.DEVICE_ID));
form.AddField ("FROM", PlayerPrefs.GetString (Link.SEARCH_BATTLE));
WWW www = new WWW(url,form);
yield return www;
if (www.error == null) {
var jsonString = JSON.Parse (www.text);
people [0].SetActive (false);
people [1].SetActive (false);
people [2].SetActive (false);
people [3].SetActive (false);
people [4].SetActive (false);
if (int.Parse(jsonString["code"]) != 33)
{
PlayerPrefs.SetInt(Link.COUNT_PLAYER_FOUND, int.Parse(jsonString["count"]));
for (int i = 0; i < PlayerPrefs.GetInt(Link.COUNT_PLAYER_FOUND); i++)
{
people[i].SetActive(true);
people[i].transform.Find("Button").GetComponent<ButtonInvite>().clickcable = true;
people[i].GetComponentInChildren<Text>().text = (i + 1).ToString() + ". " + jsonString["data"][i]["PeopleFullName"];
people[i].transform.Find("Button").GetComponent<ButtonInvite>().PeopleId = jsonString["data"][i]["PeopleId"];
people[i].transform.Find("Button").GetComponent<ButtonInvite>().PeopleFullName = jsonString["data"][i]["PeopleFullName"];
people[i].transform.Find("Button").GetComponent<ButtonInvite>().sp = true;
// people [i].transform.FindChild ("Button").GetComponentInChildren<Text> ().text = "Battle";
loading.SetActive(false);
}
loading.SetActive(false);
}
else {
ValidationError.SetActive(true);
Time.timeScale = 0;
}
} else {
Debug.Log ("GAGAL");
}
}
private IEnumerator kurangEnergy ()
{
string url = Link.url + "energy";
WWWForm form = new WWWForm ();
form.AddField (Link.ID, PlayerPrefs.GetString(Link.ID));
form.AddField("DID", PlayerPrefs.GetString(Link.DEVICE_ID));
form.AddField ("EUsed", energyused);
WWW www = new WWW(url,form);
yield return www;
if (www.error == null) {
var jsonString = JSON.Parse (www.text);
Debug.Log (www.text);
PlayerPrefs.SetString ("kodekurang", jsonString["code"]);
if (int.Parse(PlayerPrefs.GetString("kodekurang"))==1)
{
//lf.lostLife (energyused,int.Parse(jsonString["data"]["energy"]));
PlayerPrefs.SetString (Link.ENERGY,jsonString["data"]["energy"]);
//yield return new WaitForSeconds (1);
Application.LoadLevel (Link.PilihCharacter);
// if (PlayerPrefs.GetString("kodekurang")=="0") {
// Application.LoadLevel (Link.PilihCharacter);
}
} else {
Debug.Log ("GAGAL");
}
}
}
|
// **************************************************
//
// Copyright (c) 2020 Shinichi Hasebe
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
// **************************************************
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
[RequireComponent(typeof(EventTrigger))]
public class LongPressable : MonoBehaviour
{
public UnityEvent onPressBegin;
public UnityEvent onPressHold;
public UnityEvent onRelease;
private bool isPressed;
private EventTrigger eventTrigger;
void Start()
{
eventTrigger = GetComponent<EventTrigger>();
EventTrigger.Entry pointerDownEntry = new EventTrigger.Entry();
pointerDownEntry.eventID = EventTriggerType.PointerDown;
pointerDownEntry.callback.AddListener((data) =>
{
isPressed = true;
onPressBegin.Invoke();
});
EventTrigger.Entry pointerUpEntry = new EventTrigger.Entry();
pointerUpEntry.eventID = EventTriggerType.PointerUp;
pointerUpEntry.callback.AddListener((data) =>
{
isPressed = false;
onRelease.Invoke();
});
eventTrigger.triggers.Add(pointerDownEntry);
eventTrigger.triggers.Add(pointerUpEntry);
}
void Update()
{
if (isPressed)
{
onPressHold.Invoke();
}
}
}
|
namespace Boxofon.Web
{
public interface IPhoneNumberBlacklist
{
bool Contains(string number);
}
} |
using System;
using Xamarin.Forms;
namespace CaLC
{
public class MainPage : ContentPage
{
public static Label first = new Label() { TextColor = Color.White };
public static Label second = new Label() { TextColor = Color.White ,HorizontalOptions=LayoutOptions.EndAndExpand,VerticalOptions=LayoutOptions.Fill,FontSize = Device.GetNamedSize(NamedSize.Large,typeof(Label))};
public MainPage()
{
BlackScreen x = new BlackScreen();
Numberz y = new Numberz();
Content = new StackLayout
{
Padding = new Thickness(5, 20, 5, 5),
Orientation = StackOrientation.Vertical,
Children = {
x,y
}
};
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AMTApi.Models;
using AMTDll;
using AMTDll.Models;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace AMTApi.Controllers
{
[Route("api/[controller]")]
public class VehiclesController : Controller
{
IRepository<VehicleModel> _repo;
IRepository<ServiceModel> _serviceRepo;
public VehiclesController(IRepository<VehicleModel> repo, IRepository<ServiceModel> serviceRepo){
_repo = repo;
_serviceRepo = serviceRepo;
}
[HttpGet]
public IEnumerable<VehicleModel> Get()
{
return _repo.Read();
}
[HttpPost]
public string Post([FromBody]PostVehicleModel value)
{
try
{
var vehicle = value.ToVehicleModel();
var validation = ValidateVehicle(vehicle);
if (validation.Length == 0)
{
_repo.Create(vehicle);
return JsonConvert.SerializeObject(new ResultModel("New Vehicle Created", false));
}
return JsonConvert.SerializeObject(new ResultModel(validation.Aggregate((a, b) => $"{a} | {b}"), true));
}
catch (Exception ex)
{
return JsonConvert.SerializeObject(new ResultModel(ex.Message, true));
}
}
[HttpPut]
public string Put([FromBody]VehicleModel value)
{
try
{
var validation = ValidateVehicle(value);
if (validation.Length == 0)
{
_repo.Update(value);
return JsonConvert.SerializeObject(new ResultModel($"Vehicle {value.Plate} Updated!", false));
}
return JsonConvert.SerializeObject(new ResultModel(validation.Aggregate((a, b) => $"{a} | {b}"), true));
}
catch (Exception ex)
{
return JsonConvert.SerializeObject(new ResultModel(ex.Message, true));
}
}
[HttpDelete("{id}")]
public string Delete(string id)
{
try
{
var veh = Get().FirstOrDefault(item => item.Id == new Guid(id));
if (veh != null)
{
if(_serviceRepo.Read().Any(ser => ser.VehicleId == new Guid(id)))
{
return JsonConvert.SerializeObject(new ResultModel($"Can't remove {veh.Make} {veh.Model} as it's used in services!", true));
}
_repo.Remove(veh);
return JsonConvert.SerializeObject(new ResultModel($"Vehicle {veh.Plate} Deleted!", false));
}
return JsonConvert.SerializeObject(new ResultModel("Provider Not Found", true));
}
catch (Exception ex)
{
return JsonConvert.SerializeObject(new ResultModel(ex.Message, true));
}
}
string[] ValidateVehicle(VehicleModel vehicle)
{
var errors = new List<string>();
try
{
errors.AddRange(vehicle.Validate());
var vehicles = _repo.Read();
if (vehicles.Where(veh => veh.Id != vehicle.Id).Any(veh => veh.Plate.Equals(vehicle.Plate)))
errors.Add($"Vehicle with license plate \"{vehicle.Plate}\" is already existed.");
}
catch (Exception ex)
{
errors.Add(ex.Message);
}
return errors.ToArray();
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class PlayersChoicePanel : MonoBehaviour {
public MenuManager MenuManager;
public GameObject MainMenuPanel;
public Text ChoosePlayersText;
public Text WhitePlayerText;
public Text WhiteHumanText;
public Text WhiteAIText;
public Text BlackHumanText;
public Text BlackAIText;
public Toggle WhiteHumanToggle;
public Toggle WhiteAIToggle;
public Text BlackPlayerText;
public Toggle BlackHumanToggle;
public Toggle BlackAIToggle;
public Button StartGameButton;
public Text StartGameButtonText;
public Button CancelButton;
public Text CancelButtonText;
GameObject _overlayManager = null;
GameObject _gameManager = null;
GameObject _camera = null;
void Start () {
ChoosePlayersText.text = Texts.GetString ("ChoosePlayersText");
WhitePlayerText.text = Texts.GetString ("WhitePlayerText");
BlackPlayerText.text = Texts.GetString ("BlackPlayerText");
var HumanText = Texts.GetString ("HumanText");
WhiteHumanText.text = HumanText;
BlackHumanText.text = HumanText;
var AIText = Texts.GetString ("AIText");
WhiteAIText.text = AIText;
BlackAIText.text = AIText;
WhiteHumanToggle.isOn = true;
WhiteAIToggle.isOn = false;
BlackHumanToggle.isOn = true;
BlackAIToggle.isOn = false;
StartGameButtonText.text = Texts.GetString ("StartGameButtonText");
CancelButtonText.text = Texts.GetString ("CancelButtonText");
}
public void WhiteHumanToggleValueChanged () {
var currentValue = WhiteHumanToggle.isOn;
WhiteAIToggle.isOn = !currentValue;
}
public void WhiteAIToggleValueChanged () {
var currentValue = WhiteAIToggle.isOn;
WhiteHumanToggle.isOn = !currentValue;
}
public void BlackHumanToggleValueChanged () {
var currentValue = BlackHumanToggle.isOn;
BlackAIToggle.isOn = !currentValue;
}
public void BlackAIToggleValueChanged () {
var currentValue = BlackAIToggle.isOn;
BlackHumanToggle.isOn = !currentValue;
}
public void StartGame () {
bool IsWhiteHuman = WhiteHumanToggle.isOn;
bool IsBlackHuman = BlackHumanToggle.isOn;
var scene = SceneManager.GetSceneByName ("dragonchess");
if (scene.isLoaded) {
print ("Pressed start");
_overlayManager.SetActive (true);
_camera.SetActive (true);
_gameManager.SetActive (true);
var gm = _gameManager.GetComponent<GameManager> ();
gm.StopAllCoroutines ();
gm.StartNewGame (IsWhiteHuman, IsBlackHuman);
print ("Disabling menu");
MenuManager.Disable ();
} else {
StartCoroutine (LoadScene (IsWhiteHuman, IsBlackHuman));
}
}
IEnumerator LoadScene (bool IsWhiteHuman, bool IsBlackHuman) {
var ao = SceneManager.LoadSceneAsync ("dragonchess", LoadSceneMode.Additive);
yield return ao;
var gm = GameManager.Instance;
_gameManager = gm.gameObject;
gm.StartNewGame (IsWhiteHuman, IsBlackHuman);
var camera = MainGameCamera.Instance;
_camera = camera.gameObject;
foreach (GameObject go in SceneManager.GetSceneByName("dragonchess").GetRootGameObjects()) {
if (go.name == "GUIOverlay") {
_overlayManager = go;
}
}
MenuManager.Disable ();
}
public void GoBack () {
gameObject.SetActive (false);
MainMenuPanel.SetActive (true);
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Reputation : MonoBehaviour
{
public static Reputation instance = null;
private void Awake()
{
if (instance == null)
{
instance = this;
}
else if (instance != this)
{
Destroy(gameObject);
}
}
private GameManager manager;
private GameTime time;
private float reputation;
void Start()
{
manager = GameManager.instance;
time = GameTime.instance;
}
private void determineReputation()
{
float happytemp = 0;
foreach(GameObject student in manager.Allregisteredstudents)
{
happytemp += student.GetComponent<StudentMono>().stdudentinfo.Happines1;
}
happytemp = happytemp / manager.Allregisteredstudents.Count;
if (happytemp >= 0 && happytemp < 45)
{
reputation += 20;
}else if (happytemp >= 45 && happytemp < 75)
{
reputation += 40;
}else if(happytemp >= 75 && happytemp <= 100)
{
reputation += 60;
}
float[] rarity=new float[3];
//Common = 0, Great = 0, Rare = 0, Legendary = 0
float bestrarity = 0;
int place = 0;
bestrarity = rarity[0];
foreach (GameObject teacher in manager.HiredTeachers)
{
if(teacher.tag== "Common")
{
rarity[0]++;
if (rarity[0] > bestrarity)
{
bestrarity = rarity[0];
place = 0;
}
}
else if(teacher.tag== "Great")
{
rarity[1]++;
if (rarity[1] > bestrarity)
{
bestrarity = rarity[1];
place = 1;
}
}
else if(teacher.tag== "Rare")
{
rarity[2]++;
if (rarity[2] > bestrarity)
{
bestrarity = rarity[2];
place = 2;
}
}
else if(teacher.tag== "Legendary")
{
rarity[3]++;
if (rarity[3] > bestrarity)
{
bestrarity = rarity[3];
place = 3;
}
}
}
if (place == 0)
{
reputation += 5;
}else if (place == 1)
{
reputation += 10;
}
else if (place == 2)
{
reputation += 15;
}
else if (place == 3)
{
reputation += 20;
}
if (manager.Playerpublicity >= 45 && manager.Playerpublicity < 65)
{
reputation += 10;
}
else if (manager.Playerpublicity >= 65)
{
reputation += 20;
}
}
private int permastudenttospawn = 3;
private int studentstominusplus=1;
public Vector3 LocationOfSpawn = new Vector3(-7.98f, 0f, -72f);
[SerializeField] private GameObject stud, Clockposs;
public void Spawnstudents()
{
int studentstospawn = permastudenttospawn;
float randomval = Random.Range(0, 101);
if (reputation < 45)
{
if (randomval > 50) {
studentstospawn -= studentstominusplus;
}
}else if (reputation >= 65)
{
if (randomval > 50)
{
studentstospawn += studentstominusplus;
}
}
do
{
Instantiate(stud, transform.position, Quaternion.identity, Clockposs.transform);
studentstospawn--;
} while (studentstospawn != 0);
}
public void Progresive()
{
permastudenttospawn += 1;
studentstominusplus -= 1;
}
void Update()
{
determineReputation();
}
}
|
using System.ComponentModel.DataAnnotations;
using Alabo.Industry.Shop.Orders;
using Alabo.UI.Enum;
using Alabo.Web.Mvc.Attributes;
namespace Alabo.Industry.Shop.OrderActions.Domain.Enums
{
/// <summary>
/// 订单操作类型
/// 用户操作类型:从100 -199
/// 卖家操作类型:从200-299
/// 管理员操作类型:从300-399
/// 线下店铺用户操作:从400-499
/// </summary>
[ClassProperty(Name = "订单操作类型")]
public enum OrderActionType
{
#region 用户操作
/// <summary>
/// 会员创建订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员创建订单")]
[OrderActionType(Intro = "会员{OrderUserName}创建订单,订单金额为{OrderAmount}")]
UserCreateOrder = 101,
/// <summary>
/// 会员支付订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员支付订单")]
[OrderActionType(Intro = "会员{OrderUserName}支付订单,支付方式为{PayMenent}", AllowStatus = "WaitingBuyerPay", Name = "支付",
Method = "Api/Order/Pay", AllowUser = 0, Type = "Pay")]
UserPayOrder = 102,
/// <summary>
/// 会员取消订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员取消订单")]
[OrderActionType(Intro = "会员{OrderUserName}取消订单", AllowStatus = "WaitingBuyerPay", Name = "取消",
Method = "Api/Order/Cancel", AllowUser = 0, Type = "Cancel")]
UserCancleOrder = 103,
/// <summary>
/// 已发货
/// 会员退换货
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员退货退款")]
[OrderActionType(Intro = "会员{OrderUserName}申请退货退款", AllowStatus = "WaitingReceiptProduct,WaitingBuyerConfirm",
Name = "退货退款", Method = "Api/Refund/Apply", AllowUser = 0, Type = "AfterSale")]
UserReturnProduct = 104,
/// <summary>
/// 未发货
/// 会员退款
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员退款")]
[OrderActionType(Intro = "会员{OrderUserName}申请退退款", AllowStatus = "WaitingSellerSendGoods",
Name = "申请退款", Method = "Api/Refund/Apply", AllowUser = 0, Type = "Refund")]
UserRefund = 105,
/// <summary>
/// 订单评价
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "订单评价")]
[OrderActionType(Intro = "会员{OrderUserName}对订单进行评价", AllowStatus = "WaitingBuyerConfirm", Name = "评价",
Method = "UserOrderEvaluate", AllowUser = -1)]
UserEvaluate = 106,
/// <summary>
/// 查看物流
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "查看物流")]
[OrderActionType(Intro = "会员{OrderUserName}查看订单的物流", AllowStatus = "WaitingBuyerConfirm,WaitingReceiptProduct",
Name = "查看物流", Method = "Api/Order/GetExpressInfo", AllowUser = 0, Type = "ExpressInfo")]
UserCheckLogistics = 107,
/// <summary>
/// 确认收货
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "确认收货")]
[OrderActionType(Intro = "会员{OrderUserName}确认收货", AllowStatus = "WaitingReceiptProduct", Name = "确认收货",
Method = "Api/Order/Confirm", AllowUser = 0, Type = "Confirm")]
UserConfirmOrder = 108,
/// <summary>
/// 用户查看退款详情
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "用户查看退款详情")]
[OrderActionType(Intro = "用户{OrderUserName}查看退款详情", AllowStatus = "Refunded,AfterSale,Refund", Name = "售后详情",
Method = "Api/Refund/Get", Type = "UserRefundInfo", AllowUser = 0)]
UserRefundInfo = 109,
/// <summary>
/// 用户查看退款详情
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "用户取消售后")]
[OrderActionType(Intro = "用户{OrderUserName}取消售后", AllowStatus = "AfterSale,Refund", Name = "取消售后",
Method = "Api/Refund/Get", Type = "UserRefundCencal", AllowUser = -1)]
UserRefundCencal = 120,
#endregion 用户操作
#region 供应商操作
/// <summary>
/// 卖家代付
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家代付")]
[OrderActionType(Intro = "卖家{SellerUserName}后台手动支付订单", AllowStatus = "WaitingBuyerPay", Name = "代付",
Method = "OrderSellerPay")]
SellerPay = 201,
/// <summary>
/// 卖家发货
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家发货")]
[OrderActionType(Intro = "卖家{SellerUserName}发货",
AllowStatus = "Remited,WaitingReceiptProduct,WaitingSellerSendGoods", //WaitingBuyerConfirm
Name = "发货", Method = "OrderAdminDelivery", AllowUser = 1)]
SellerDelivery = 202,
/// <summary>
/// 卖家取消订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家取消订单")]
[OrderActionType(Intro = "卖家{SellerUserName}后台取消", AllowStatus = "WaitingBuyerPay", Name = "取消",
Method = "OrderSellerCancle")]
SellerCancelOrder = 203,
/// <summary>
/// 卖家删除订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家删除订单")]
[OrderActionType(Intro = "卖家{SellerUserName}后台取消", AllowStatus = "WaitingBuyerPay", Name = "取消",
Method = "OrderSellerCancle")]
SellerDeleteOrder = 204,
/// <summary>
/// 卖家修改订单地址
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家修改订单地址")]
[OrderActionType(Intro = "卖家{SellerUserName}后台取消", AllowStatus = "WaitingBuyerPay", Name = "取消",
Method = "OrderSellerCancle")]
SellerEditAddress = 205,
/// <summary>
/// 卖家关闭订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家关闭订单")]
[OrderActionType(Intro = "卖家{SellerUserName}后台取消订单", AllowStatus = "WaitingBuyerPay", Name = "取消",
Method = "OrderSellerCancle")]
SellerClose = 212,
/// <summary>
/// 卖家手动完成订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家手动完成订单")]
[OrderActionType(Intro = "卖家{SellerUserName}后台关闭订单", AllowStatus = "WaitingBuyerPay", Name = "关闭",
Method = "OrderSellerCancle", Type = "SellerClose", AllowUser = 1)]
SellerSucess = 213,
/// <summary>
/// 卖家删除订单
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家手动删除订单")]
[OrderActionType(Intro = "卖家{SellerUserName}后台删除订单", AllowStatus = "WaitingBuyerPay", Name = "删除",
Method = "OrderSellerDelete")]
SellerDelete = 214,
/// <summary>
/// 卖家退款
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "卖家手动退款")]
[OrderActionType(Intro = "卖家{SellerUserName}退款", AllowStatus = "AfterSale,Refund", Name = "退款",
Method = "Api/Refund/Process", Type = "SellerRefund", AllowUser = 1)]
SellerRefund = 215,
#endregion 供应商操作
#region 管理员操作
/// <summary>
/// 管理员代付
/// 对应方法:IOrderAdminService.Pay
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员代付")]
[OrderActionType(Intro = "管理员{AdminUserName}后台手动支付订单", Icon = FontAwesomeIcon.Paragraph,
AllowStatus = "WaitingBuyerPay", Color = "danger", Name = "代付", Method = "OrderAdminPay")]
AdminPay = 301,
/// <summary>
/// 管理员发货
/// /// 对应方法:IOrderAdminService.Delivery
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员发货")]
[OrderActionType(Intro = "管理员{AdminUserName}发货", Icon = FontAwesomeIcon.ProductHunt,
AllowStatus = "WaitingSellerSendGoods,WaitingBuyerConfirm", Name = "发货", Color = "brand",
Method = "OrderAdminDelivery", AllowUser = 2)]
AdminDelivery = 302,
/// <summary>
/// 管理员修改邮费金额
/// 对应方法:IOrderService.UpdateExpressAmount
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员修改邮费金额")]
[OrderActionType(Intro = "管理员{AdminUserName}后台修改邮费{ExpressAmount}", Icon = FontAwesomeIcon.ProductHunt,
AllowStatus = "WaitingBuyerPay", Name = "修改邮费", Color = "brand",
Method = "UpdateExpressAmount", AllowUser = 2)]
AdminEditExpressAmount = 304,
/// <summary>
/// 管理员修改订单地址
/// 对应方法:IOrderAdminService.ChangeAddress
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员修改订单地址")]
[OrderActionType(Intro = "管理员{AdminUserName}后台取消", Icon = FontAwesomeIcon.AddressCard,
AllowStatus = "WaitingBuyerPay,WaitingSellerSendGoods", Name = "修改地址", Color = "info",
Method = "OrderAdminChangeAddress", AllowUser = 2)]
AdminEditAddress = 305,
/// <summary>
/// 管理员手动完成订单
/// 对应方法:IOrderAdminService.Sucess
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员手动完成订单")]
[OrderActionType(Intro = "管理员{AdminUserName}后台关闭订单", Icon = FontAwesomeIcon.Superscript,
AllowStatus = "WaitingReceiptProduct,WaitingEvaluated", Name = "完成", Color = "success",
Method = "OrderAdminSucess")]
AdminSucess = 313,
/// <summary>
/// 备忘
/// /// 对应方法:IOrderAdminService.Remark
/// 数据保存:OrderExtension.OrderRemark.PlatplatformRemark 中
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员备忘")]
[OrderActionType(Intro = "管理员{AdminUserName}后台删除订单", Icon = FontAwesomeIcon.Medium,
AllowStatus = "WaitingBuyerPay,WaitingSellerSendGoods,WaitingReceiptProduct,Success,Closed", Name = "备忘",
Method = "OrderAdminRemark", AllowUser = 2)]
AdminRemark = 315,
/// <summary>
/// 备忘
/// /// 对应方法:IOrderAdminService.Message
/// 数据保存:OrderExtension.Message.PlatplatformMessage
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员回复留言")]
[OrderActionType(Intro = "管理员{AdminUserName}后台删除订单", Icon = FontAwesomeIcon.AddressBook,
AllowStatus = "WaitingBuyerPay,WaitingSellerSendGoods", Name = "留言", Method = "OrderAdminMessage",
AllowUser = 2)]
AdminMessage = 316,
/// <summary>
/// 备忘
/// 对应方法:IOrderAdminService.Rate
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "评价")]
[OrderActionType(Intro = "管理员{AdminUserName}后台删除订单", Color = "danger", Icon = FontAwesomeIcon.Calculator,
AllowStatus = "WaitingEvaluated,WaitingReceiptProduct,Success,Closed", Name = "评价",
Method = "OrderAdminRate ")]
AdminRate = 317,
/// <summary>
/// 管理员关闭订单
/// 对应方法:IOrderAdminService.Cancle
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员关闭订单")]
[OrderActionType(Intro = "管理员{AdminUserName}后台取消订单", Icon = FontAwesomeIcon.WindowClose,
AllowStatus = "WaitingBuyerPay", Name = "关闭", Type = "AdminClose", Color = "metal",
Method = "Api/OrderAdmin/AdminCancel", AllowUser = 2)]
AdminClose = 319,
/// <summary>
/// 管理员删除订单
/// /// 对应方法:IOrderAdminService.Delete
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员手动删除订单")]
[OrderActionType(Intro = "管理员{AdminUserName}后台删除订单", AllowStatus = "WaitingBuyerPay,Closed",
Icon = FontAwesomeIcon.Recycle, Name = "删除", Method = "OrderAdminDelete")]
AdminDelete = 320,
/// <summary>
/// 查看物流
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员查看物流")]
[OrderActionType(Intro = "管理员{AdminUserName}查看订单的物流", AllowStatus = "WaitingBuyerConfirm,WaitingReceiptProduct",
Name = "查看物流", Method = "Api/Order/GetExpressInfo", AllowUser = 2)]
AdminCheckLogistics = 321,
/// <summary>
/// 管理员退款
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员手动退款")]
[OrderActionType(Intro = "管理员{AdminUserName}退款", AllowStatus = "AfterSale,Refund", Name = "退款",
Method = "Api/Refund/Process", Type = "AdminRefund", AllowUser = 2)]
AdminRefund = 322,
/// <summary>
/// 管理员查看退款详情
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员查看退款详情")]
[OrderActionType(Intro = "管理员{AdminUserName}查看退款详情", AllowStatus = "Refunded,AfterSale,Refund", Name = "退款详情",
Method = "Api/Refund/Get", Type = "AdminRefundInfo", AllowUser = 2)]
AdminRefundInfo = 323,
/// <summary>
/// 管理员同意退货退款
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员拒绝退货退款")]
[OrderActionType(Intro = "管理员{AdminUserName}同意退货退款", AllowStatus = "AfterSale", Name = "同意退货退款",
Method = "AdminAllowRefund", Type = "AdminAllowRefund", AllowUser = 2)]
AdminAllowRefund = 324,
/// <summary>
/// 管理员拒绝退货退款
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员拒绝退货退款")]
[OrderActionType(Intro = "管理员{AdminUserName}拒绝退货退款", AllowStatus = "AfterSale,Refund", Name = "拒绝退货退款",
Method = "AdminRefuseRefund", Type = "AdminRefuseRefund", AllowUser = 2)]
AdminRefuseRefund = 325,
/// <summary>
/// 管理员拒绝退货退款
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "管理员支付货款")]
[OrderActionType(Intro = "管理员{AdminUserName}支付货款", AllowStatus = "WaitingSellerSendGoods", Name = "管理员支付货款",
Method = "AdminPayment", Type = "AdminRefuseRefund", AllowUser = 2)]
AdminPayment = 326,
#endregion 管理员操作
#region 线下店铺用户操作
/// <summary>
/// 会员创建订单(线下店铺)
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员创建订单")]
[OrderActionType(Intro = "会员{OrderUserName}创建订单,订单金额为{OrderAmount}")]
OfflineUserCreateOrder = 401,
/// <summary>
/// 会员支付订单(线下店铺)
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员支付订单")]
[OrderActionType(Intro = "会员{OrderUserName}支付订单,支付方式为{PayMenent}", AllowStatus = "WaitingBuyerPay", Name = "支付",
Method = "api/order/pay", AllowUser = 3)]
OfflineUserPayOrder = 402,
/// <summary>
/// 会员取消订单(线下店铺)
/// </summary>
[LabelCssClass("text-success")]
[Display(Name = "会员取消订单")]
[OrderActionType(Intro = "会员{OrderUserName}取消订单", AllowStatus = "WaitingBuyerPay", Name = "取消",
Method = "api/order/cancel", AllowUser = 3)]
OfflineUserCancleOrder = 403,
#endregion 线下店铺用户操作
}
} |
using JT808.Protocol.Formatters;
using JT808.Protocol.MessagePack;
namespace JT808.Protocol.MessageBody
{
/// <summary>
/// 补传分包请求
/// 0x8003
/// </summary>
public class JT808_0x8003 : JT808Bodies, IJT808MessagePackFormatter<JT808_0x8003>
{
public override ushort MsgId { get; } = 0x8003;
/// <summary>
/// 原始消息流水号
/// 对应要求补传的原始消息第一包的消息流水号
/// </summary>
public ushort OriginalMsgNum { get; set; }
/// <summary>
/// 重传包总数
/// n
/// </summary>
public byte AgainPackageCount { get; set; }
/// <summary>
/// 重传包 ID 列表
/// BYTE[2*n]
/// 重传包序号顺序排列,如“包 ID1 包 ID2......包 IDn”。
/// </summary>
public byte[] AgainPackageData { get; set; }
public JT808_0x8003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
{
JT808_0x8003 jT808_0X8003 = new JT808_0x8003();
jT808_0X8003.OriginalMsgNum = reader.ReadUInt16();
jT808_0X8003.AgainPackageCount = reader.ReadByte();
jT808_0X8003.AgainPackageData = reader.ReadArray(jT808_0X8003.AgainPackageCount * 2).ToArray();
return jT808_0X8003;
}
public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8003 value, IJT808Config config)
{
writer.WriteUInt16(value.OriginalMsgNum);
writer.WriteByte((byte)(value.AgainPackageData.Length / 2));
writer.WriteArray(value.AgainPackageData);
}
}
}
|
using System;
namespace Zadanie_1A
{
class Program
{
//Jaką instrukcję należy dodać poza pętlą,
//aby sprawdzić, czy w tablicy A był element o wartości x?
static int Wyszukaj(int[] A, int x)
{
int N = A.Length;
int k = N - 1;
while (k >= 0 && A[k] != x)
k -= 1;
//Odp. if(k==-1) Console.WriteLine("W tablicy nie było elementu o wartości równej x.");
return k;
}
static void Main(string[] args)
{
//Podaj także indeks tej wartości 1 która zostanie znaleziona jeżeli wywołamy metodę
//wyszukaj dla poniższej tablicy
//Odp.9
int[] L = { 3, 1, 4, 5, 6, 9, 1, 0, 7, 1, 2, 2, 6 };
int n = Wyszukaj(L, 1);
Console.WriteLine(n);
Console.ReadKey();
}
}
}
|
using System.Drawing;
using rpg;
public class Item
{
//item数组
public static Item[] item;
public int num = 0; //物品数量
public string name = ""; //物品名字
public string description = ""; //物品描述
public Bitmap bitmap; //物品图片
public int isdepletion = 1; //是否为可消耗类
public int value1=0; //作为装备
public int value2 = 0; //value1 装备类型1-att 2-def //作为药品时
public int value3 = 0; //value2-5 攻击 防御 速度 运气
public int value4 = 0;
public int value5 = 0;
public int cost = 100;
//战斗使用
public int canfuse = 0; //能否在战斗中使用
public int fvalue1 = 0; //攻击值参数
public int fvalue2 = 0;
public Animation fanm;
public void set(string name, string description, string bitmap_path, int isdepletion, int value1, int value2, int value3, int value4, int value5)
{
this.name = name;
this.description = description;
if(bitmap_path!=null&&bitmap_path!="")
{
bitmap=new Bitmap(bitmap_path);
bitmap.SetResolution(96,96);
}
this.isdepletion=isdepletion;
this.value1=value1;
this.value2=value2;
this.value3=value3;
this.value4=value4;
this.value5=value5;
}
public delegate void Use_event(Item item);
public event Use_event use_event;
public void use()
{
if (num < 0) //是否有这物品
return;
if (isdepletion != 0) //是否为消耗品
num--;
if (use_event != null) // 使用事件
use_event(this);
}
//物品增加减少方法
public static void add_item(int index, int num)
{
if (item == null) return; //异常处理
if (index < 0) return;
if (index >= item.Length) return;
if (item[index] == null) return;
item[index].num += num; //数量增减
if (item[index].num < 0) //异常数值处理
item[index].num = 0;
}
//添加hp
public static void add_hp(Item item)
{
Player player = Form1.player[Player.select_player];
player.hp += item.value1;
if (player.hp > player.max_hp)
player.hp = player.max_hp;
if (player.hp < 0)
player.hp = 0;
}
//添加mp
public static void add_mp(Item item)
{
Player player=Form1.player[Player.select_player];
player.mp += item.value1;
if (player.mp > player.max_mp)
player.mp = player.max_mp;
}
//卸下装备的方法
public static void unequip(int type)
{
//获取index
int index;
if (type == 1)
{
index = Form1.player[Player.select_player].equip_att; //记录武器类装备
Form1.player[Player.select_player].equip_att = -1; //卸下装备
}
else if (type == 2)
{
index = Form1.player[Player.select_player].equip_def; //记录防具类
Form1.player[Player.select_player].equip_def=-1;
}
else
return;
if (item == null) return; //一些异常
if (index < 0) return;
if (index >= item.Length) return;
if (item[index] == null) return;
add_item(index,1); //添加物品
}
//value1 装备类型 1-att 2-def
//value2-5 攻击 防御 速度 运气的增减值
public static void equip(Item item)
{
if (Item.item == null) return;
if (item == null) return;
int index = -1;
for (int i = 0; i < Item.item.Length; i++)
{
if (Item.item[i] == null)
continue;
if (item.name == Item.item[i].name && item.description == Item.item[i].description)
{
index = i;
break;
}
}
if (index < 0) return;
if (index >= Item.item.Length) return;
if (Item.item[index] == null) return;
unequip(item.value1); //卸下装备
if (item.value1 == 1) //穿戴新装备
Form1.player[Player.select_player].equip_att = index;
else if (item.value1 == 2)
Form1.player[Player.select_player].equip_def = index;
else
return;
}
public static void lpybook(Item item)
{
Message.show("","得此书者,称霸武林","",Message.Face.LEFT);
Task.block();
Message.show("","只待有缘人","",Message.Face.LEFT);
Task.block();
}
//定义物品战斗属性
public void fset(Animation fanm, int fvalue1, int fvalue2)
{
this.fanm = fanm;
this.fvalue1 = fvalue1;
this.fvalue2 = fvalue2;
this.canfuse = 1;
if (fanm != null)
fanm.load();
}
//判断玩家是否拥有
public bool check_fuse()
{
if (num <= 0)
return false;
if (canfuse != 1) //能否在战斗中使用
return false;
if (isdepletion != 0) //消耗则扣除
num--;
return true;
}
} |
namespace AI2048.AI.Heristics
{
using AI2048.AI.SearchTree;
public interface IHeuristic
{
double Evaluate(IPlayerNode node);
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Normal_4_11
{
class Program
{
static void Main(string[] args)
{
int size = 0;
Console.Write("Введите размер массива-> ");
size = Convert.ToInt32(Console.ReadLine());
int[] number = new int[size];
Random r = new Random();
for (int i = 0; i < number.Length; i++)
{
number[i] = r.Next(-100, 100);
Console.Write(number[i] + " ");
}
for (int i = 0; i < number.Length; i++)
{
if (number[i] % 2 == 0)
{
Console.Write("\nЧетные числа :{0} ", number[i]);
}
}
for (int i = 0; i < number.Length; i++)
{
if (number[i] % 2 != 0)
{
Console.Write("\nНе четные числа: {0} ", number[i]);
}
}
Console.ReadKey();
}
}
}
|
namespace MvcApp.Web.ViewModels
{
public class SignedViewModel
{
public string Username { get; set; }
public override string ToString()
{
return this.Username;
}
}
} |
namespace CheckIt
{
using CheckIt.Syntax;
internal class CheckReference : IReference
{
public CheckReference(string name)
{
this.Name = name;
}
public string Name { get; private set; }
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Blackjack;
using BlackjackViewPresenter;
using Cards;
namespace BlackjackGUI
{
public class BlackjackInsuranceDialog : IBlackjackInsuranceView
{
public bool Insure { get; set; }
public AutoResetEvent Signal { get; set; }
public void Prompt(BlackjackHand hand, Card upCard)
{
DialogResult result = MessageBox.Show("Dealer shows an Ace.\nTake insurance?", "Insurance", MessageBoxButtons.YesNo);
Insure = result == DialogResult.Yes;
Signal.Set();
}
}
public class BlackjackSurrenderDialog : IBlackjackEarlySurrenderView
{
public bool Surrender { get; set; }
public AutoResetEvent Signal { get; set; }
public void Prompt(BlackjackHand hand, Card upCard)
{
DialogResult result = MessageBox.Show("Surrender your hand early?", "Early Surrender", MessageBoxButtons.YesNo);
Surrender = result == DialogResult.Yes;
Signal.Set();
}
}
}
|
using Microsoft.Xna.Framework;
namespace Entoarox.ExtendedMinecart
{
internal class ModConfig
{
/*********
** Accessors
*********/
public bool RefuelingEnabled = true;
public bool AlternateDesertMinecart = false;
public bool AlternateFarmMinecart = false;
public bool FarmDestinationEnabled = true;
public bool DesertDestinationEnabled = true;
public bool WoodsDestinationEnabled = true;
public bool BeachDestinationEnabled = true;
public bool WizardDestinationEnabled = true;
public bool UseCustomFarmDestination = false;
public Point CustomFarmDestinationPoint = new Point(0, 0);
}
}
|
using FamilyAccounting.Web.Interfaces;
using FamilyAccounting.Web.Models;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace FamilyAccounting.Web.Controllers
{
public class CardController : Controller
{
private readonly ICardWebService cardWebService;
private readonly IWalletWebService walletWebService;
public CardController(ICardWebService cardWebService, IWalletWebService walletWebService)
{
this.cardWebService = cardWebService;
this.walletWebService = walletWebService;
}
public IActionResult Create(int id)
{
CardViewModel cardViewModel = new CardViewModel
{
WalletId = id
};
return View(cardViewModel);
}
[HttpPost]
public async Task<IActionResult> Create(CardViewModel card)
{
await cardWebService.Create(card);
return RedirectToAction("Details", "Wallet", new { id = card.WalletId });
}
[HttpGet]
public async Task<ViewResult> Delete(int? id)
{
var card = await cardWebService.Get((int)id);
return View(card);
}
[ActionName("Delete")]
[HttpPost]
public async Task<IActionResult> DeleteCard(int? id)
{
var card = await cardWebService.Get((int)id);
await cardWebService.Delete((int)id);
return RedirectToAction("Details", "Wallet", new { id = card.WalletId });
}
[HttpGet]
public async Task<IActionResult> Update(int id)
{
var updatedCard = await cardWebService.Get(id);
return View(updatedCard);
}
[HttpPost]
public async Task<IActionResult> Update(int id, CardViewModel card)
{
if (ModelState.IsValid)
{
await cardWebService.Update(id,card);
}
return RedirectToAction("Details", "Card", new { id = card.WalletId });
}
public async Task<IActionResult> Details(int Id)
{
var card = await cardWebService.Get(Id);
return View(card);
}
}
}
|
using System;
namespace Yet_another_explanation_of_variance
{
class Base { }
class Derived : Base { }
delegate TOutput InvariantFunc<TOutput>();
delegate void InvariantAction<TInput>(TInput input);
class Program
{
Derived ReturnDerived() { return new Derived(); }
void InputBase(Base input) { }
void LegalInvariance()
{
InvariantFunc<Base> notCovariance = ReturnDerived;
Base aBaseClassInstance = notCovariance();
InvariantAction<Derived> notContravariance = InputBase;
notContravariance(new Derived());
}
void IllegalInvariance()
{
InvariantFunc<Derived> returnDerived = ReturnDerived;
// illegal:
InvariantFunc<Base> needsCovariance = returnDerived;
InvariantAction<Base> inputBase = InputBase;
// illegal:
InvariantAction<Derived> needsContravariance = inputBase;
}
void CovarianceAndContravariance()
{
Func<Derived> returnDerived = ReturnDerived;
// legal because TOutput in Func<TOutput> is covariant
Func<Base> usesCovariance = returnDerived;
Action<Base> inputBase = InputBase;
// legal because TInput in Action<TInput> is contravariant
Action<Derived> usesContravariance = inputBase;
}
static void Main(string[] args)
{
}
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
#nullable disable
namespace HROADS_WebApi.Domains
{
public partial class Habilidade
{
public int IdHabilidade { get; set; }
public int? IdTipo { get; set; }
[Required(ErrorMessage = "O nome da Habilidade é obrigatorio!")]
public string Nome { get; set; }
public virtual TiposDeHabilidade IdTipoNavigation { get; set; }
}
}
|
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace NStandard.Json.Converters
{
public class VariantConverter : JsonConverter<Variant>
{
public override bool CanConvert(Type objectType) => objectType.IsType(typeof(Variant));
public override Variant Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return reader.TokenType switch
{
JsonTokenType.None => new Variant(null as string),
JsonTokenType.Null => new Variant(null as string),
JsonTokenType.String => reader.GetString(),
JsonTokenType.Number => reader.GetDouble(),
JsonTokenType.False => false,
JsonTokenType.True => true,
_ => throw new NotSupportedException($"{reader.TokenType} is not supported."),
};
}
public override void Write(Utf8JsonWriter writer, Variant value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToString());
}
}
}
|
namespace WinAppDriver.Handlers
{
using System.Collections.Generic;
[Route("GET", " /session/:sessionId/element/:id/equals/:other")]
internal class SameElementHandler : IHandler
{
private static ILogger logger = Logger.GetLogger("WinAppDriver");
public object Handle(Dictionary<string, string> urlParams, string body, ref ISession session)
{
var element = session.GetUIElement(int.Parse(urlParams["id"]));
var other = session.GetUIElement(int.Parse(urlParams["other"]));
return element.Equals(other);
}
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Strings
{
// event cards
public const string EVENT_STORED_ALREADY = "Already storing an event card";
public const string NO_EVENTS_IN_DISCARD = "No events available in discard";
public const string PLAY_EVENT_OR_DISCARD = "Over hand limit - play event card or discard";
public const string RESILIENT_POPULATION = "Choose an infection card to remove from game";
public const string FORECAST = "Select cards in order to replace on deck (first on top)";
public const string AIRLIFT = "Select player to airlift";
public const string DISCARD_PREFIX = "Discard from hand: ";
public const string DISCARD_SUFFIX = " required";
public const string SELECT_CARD = "Select card";
public const string CONTINUE_INFECTION_PHASE = "Infection Draw";
public const string CONTINUE_INTENSIFY = "Intensify step";
// decks
public const string PLAYER_DISCARD = "Player Discard Pile";
public const string PLAYER_DISCARD_EMPTY = "Player discard pile empty";
public const string INFECTION_DISCARD = "Infection Discard Pile";
public const string INFECTION_DISCARD_EMPTY = "Infection discard pile empty";
public const string AVAILABLE_EVENTS = "Available Event Cards";
public const string AVAILABLE_EVENTS_EMPTY = "No events available";
// selection
public const string SELECT_PLAYER_MOVE = "Select player to move";
public const string REPLACE_RESEARCH_STATION = "Select research station to remove";
}
|
using System.Text;
using Entrata.Model.Requests;
using Microsoft.AspNet.Identity;
using Microsoft.Data.OData.Query.SemanticAst;
//using Yardi.Client.ResidentData;
//using Yardi.Client.ResidentTransactions;
namespace ApartmentApps.Api
{
public static class Extensions
{
public static string NumbersOnly(this string str)
{
if (string.IsNullOrEmpty(str)) return null;
var strBuilder = new StringBuilder();
foreach (var c in str)
{
if (char.IsDigit(c))
{
strBuilder.Append(c);
}
}
return strBuilder.ToString();
}
}
///// <summary>
///// Handles the synchronization of entrata and apartment apps.
///// </summary>
//public class EntrataIntegration :
// PropertyIntegrationAddon,
// IMaintenanceSubmissionEvent,
// IMaintenanceRequestCheckinEvent,
// IDataImporter
//{
// public ApplicationDbContext Context { get; set; }
// public PropertyContext PropertyContext { get; set; }
// public EntrataIntegration(Property property, ApplicationDbContext context,PropertyContext propertyContext, IUserContext userContext) : base(property, userContext)
// {
// Context = context;
// PropertyContext = propertyContext;
// }
// public override bool Filter()
// {
// return PropertyContext.PropertyEntrataInfos.Any();
// }
// public void MaintenanceRequestSubmited( MaitenanceRequest maitenanceRequest)
// {
// // Sync with entrata on work order
// }
// public void MaintenanceRequestCheckin(MaintenanceRequestCheckin maitenanceRequest, MaitenanceRequest request)
// {
// }
//}
} |
using System;
using System.Collections;
namespace CursoCsharp.Colecoes
{
class ColecoesArrayList
{
public static void Executar()
{
var lista = new ArrayList {"Palavra", 3, true };
lista.Add(3.45);
foreach(var t in lista)
{
Console.WriteLine("{0} => {1}", t, t.GetType());
}
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Collider2D))]
[RequireComponent(typeof(Rigidbody2D))]
public class Resortera : MonoBehaviour {
public Transform _pivot;
public float _springRange;
public float _maxVel;
public GameObject _flecha;
public Transform _player;
public Rigidbody2D _rb;
Vector3 initPos = new Vector3(0, 2, 1.1f);
Vector3 endPos = new Vector3(0, 0, 1.1f);
public bool canDrag = true;
// Use this for initialization
void Start ()
{
_rb.GetComponent<Rigidbody2D>();
_rb.bodyType = RigidbodyType2D.Kinematic;
}
private void Update()
{
if (!canDrag)
{
_flecha.transform.localPosition = Vector3.Lerp(transform.localPosition, endPos, Time.deltaTime);
}
FlechaFace();
}
void OnMouseDrag()
{
if (!canDrag)
return;
var pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
var dis = pos - _pivot.position;
dis.z = 0;
if (dis.magnitude > _springRange)
{
dis = dis.normalized * _springRange;
}
_flecha.transform.localPosition = initPos + dis + _pivot.position;
}
void OnMouseUp()
{
if (!canDrag)
return;
canDrag = false;
}
void FlechaFace()
{
if (!canDrag)
return;
Vector2 direccion = new Vector2(
_player.transform.position.x - _flecha.transform.position.x,
_player.transform.position.y - _flecha.transform.position.y);
_flecha.transform.up = direccion;
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;
using MongoDB.Bson;
using TrumpTown.DataAccess;
using TrumpTown.Models;
using MongoDB.Bson.IO;
namespace TrumpTown
{
public class TrumpTownHub : Hub
{
private static List<string> _clients = new List<string>();
private static List<string> _readyUsers = new List<string>();
private static Dictionary<BsonValue, string> _userCardsInPlay = new Dictionary<BsonValue, string>();
private static List<BsonDocument> _cardsInPlay = new List<BsonDocument>();
private static MongoData _mongo = new MongoData();
public void JoinGame()
{
var username = GetUserName();
Clients.Caller.username = username;
Clients.Others.OnJoined(username);
}
public override System.Threading.Tasks.Task OnDisconnected()
{
Clients.Others.OnLeave(Clients.Caller.Username);
_clients.Remove(Context.ConnectionId);
return base.OnDisconnected();
}
public override System.Threading.Tasks.Task OnConnected()
{
if (_clients.Count == 0)
{
Clients.Caller.WonLast = true;
}
_clients.Add(Context.ConnectionId);
return base.OnConnected();
}
public void Deal()
{
var card = _mongo.GetRecord();
var id = card["_id"];
_userCardsInPlay.Add(id, Context.ConnectionId);
_cardsInPlay.Add(card);
var json = card.ToJson(new JsonWriterSettings { OutputMode = JsonOutputMode.Strict });
Clients.Caller.OnCard(json);
}
public void Play(string dataField, bool compareLower)
{
if (Clients.Caller.WonLast)
{
// compare data, get winner
var winningCard = Compare(dataField, compareLower);
var winner = Clients.Client(_userCardsInPlay[winningCard]);
winner.WonLast = true;
Clients.All.OnEndRound(winningCard.ToJson(), winner.Username);
}
}
private BsonValue Compare(string dataField, bool compareLower)
{
// get the field values from the cards
var comparer = new DocComparer(dataField, compareLower);
_cardsInPlay.Sort(comparer);
return _cardsInPlay.FirstOrDefault()["_id"];
}
public void PlayerReady()
{
_readyUsers.Add(Context.ConnectionId);
Clients.Others.OnPlayerReady(Clients.Caller.Username);
if (_readyUsers.Count.Equals(_clients.Count))
{
Clients.All.OnDeal();
_readyUsers.Clear();
}
}
public string GetUserName()
{
return Context.User != null ? Context.User.Identity.Name : "";
}
}
public class DocComparer : IComparer<BsonDocument>
{
private readonly string _field;
private readonly bool _compareLower;
public DocComparer(string field, bool compareLower)
{
_field = field;
_compareLower = compareLower;
}
public int Compare(BsonDocument xDoc, BsonDocument yDoc)
{
if (xDoc[_field] > yDoc[_field])
return _compareLower ? -1 : 1;
if (xDoc[_field] < yDoc[_field])
return _compareLower ? 1 : -1;
return 0;
}
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TeamCityWatcher
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var config = ConfigurationManager.AppSettings;
var saveRepositroy = new SaveStateRepository(config["SaveFile"]);
var tcRepository = new TeamCityRepository(config["TeamCityHost"], config["TeamCityUser"], config["TeamCityPassword"]);
var viewModel = new WatcherViewModel(Convert.ToInt32(config["UpdateInterval"]));
var controller = new WatcherController(viewModel, tcRepository, saveRepositroy);
var view = new WatcherView(viewModel, controller);
var updater = new BackgroundUpdater(view, viewModel, controller);
updater.Start();
Application.Run(view);
}
}
}
|
/* Author's name: Jiho Yoo
* Last Modified by: Jiho Yoo
* Date last Modified: Feb 29, 2015
* Description: The Phoo is getting coins to buy honey.
* Revision History:
* Feb 20, 2016 - set background and images.
* Feb 22, 2016 - write codes
* Feb 26, 2016 - set audios
* Feb 29, 2016 - found errors
*/
using UnityEngine;
using System.Collections;
public class SpikedWheelController : MonoBehaviour {
// PRIVATE INSTANCE VARIABLES
private Transform _transform;
// Use this for initialization
void Start () {
this._transform = gameObject.GetComponent<Transform> ();
}
// Update is called once per frame
void Update () {
this._transform.Rotate (0, 0, -2f);
}
}
|
using DatabaseManagement.Configuration;
using DatabaseManagement.EnvDte;
using DatabaseManagement.Logging;
using DatabaseManagement.Migrations;
using DatabaseManagement.Models;
using DatabaseManagement.ProjectHelpers;
using DatabaseManagement.SqlDb;
using NHibernate.Tool.hbm2ddl;
using NHibernateMigrationRepo;
using NHibernateRepo.Migrations;
using System;
using System.Reflection;
using FluentNHibernate.Cfg;
namespace DatabaseManagement
{
public class SchemaSetup
{
/// <summary>
/// Applies the database update, be that automatic or manual according to the configuration class.
/// </summary>
/// <param name="criteria"></param>
public void UpdateDatabase(UpdateDatabaseCriteria criteria)
{
var status = GetMigrationConfigurationStatus(criteria.ProjectFilePath, criteria.RepoName);
if (!status.Enabled)
{
LoggerBase.Log("Migrations are not enabled");
return;
}
switch (status.MigrationType)
{
case MigrationToUse.Automatic:
UpdateDatabaseAutomatically(new AutomaticUpdateCriteria
{
ProjectFilePath = criteria.ProjectFilePath,
RepoName = criteria.RepoName
});
break;
case MigrationToUse.Manual:
ApplyMigrations(new ApplyMigrationCriteria
{
ProjectPath = criteria.ProjectFilePath,
RepoName = criteria.RepoName
});
break;
default:
throw new ArgumentOutOfRangeException();
}
//clean up
ProjectEvalutionHelper.FinishedWithProject(criteria.ProjectFilePath);
}
/// <summary>
/// Enables the ability for that project to be able to use NHibernate Repo migrations, automatic or manual.
/// </summary>
public void EnableMigrations(EnableMigrationsCriteria criteria)
{
MessageFilter.Register();
var repoInfo = TypeHandler.FindSingleRepo(criteria.ProjectPath, criteria.RepoName);
//if it is null something is wrong so drop out.
if (repoInfo == null) return;
AssertRepoHasEmptyConstructor(repoInfo.RepoType);
EnsureDbAndMigrationTableExists(criteria.ProjectPath, repoInfo.RepoType, criteria.ConfigFilePath);
var repoBase = TypeHandler.CreateRepoBase(repoInfo.Assembly.Location, repoInfo.RepoType);
//create migration log table, if it doesn't exist.
var updater = CreateSchemaUpdater(criteria.ProjectPath, typeof(MigrationRepo), criteria.ConfigFilePath, repoBase.ConnectionStringOrName);
updater.Execute(true, true);
bool multipleFound = false;
var configType = TypeHandler.FindSingleConfiguration(criteria.ProjectPath, repoInfo.RepoType, out multipleFound);
//this should not happen. should only ever have one config per repo type.
if(multipleFound) return;
if (configType == null)
{
LoggerBase.Log("Adding migration configuration");
var filePath = new ConfigurationFileHandler().CreateConfigurationFile(criteria.ProjectPath, repoInfo.RepoType.Name, "Migrations", MigrationToUse.Manual);
new ProjectDteHelper().AddFile(criteria.ProjectPath, "Migrations", filePath, showFile: true);
}
else
{
LoggerBase.Log("System is already configured for migrations, see class: " + configType.Name);
}
//clean up
ProjectEvalutionHelper.FinishedWithProject(criteria.ProjectPath);
MessageFilter.Revoke();
}
/// <summary>
/// Automatically update the database schema to bring it up to date.
/// </summary>
/// <param name="criteria">creation criteria</param>
public void UpdateDatabaseAutomatically(AutomaticUpdateCriteria criteria)
{
var configurationStatus = GetMigrationConfigurationStatus(criteria.ProjectFilePath, criteria.RepoName);
if (!configurationStatus.Enabled)
{
LoggerBase.Log("Migrations are not enabled, can not apply any migrations.");
return;
}
if (configurationStatus.MigrationType != MigrationToUse.Automatic)
{
LoggerBase.Log("automatic Migrations are not enabled, can not apply any migrations.");
return;
}
var repoInfo = TypeHandler.FindSingleRepo(criteria.ProjectFilePath, criteria.RepoName);
//if null we need to drop out.
if (repoInfo == null) return;
AssertRepoHasEmptyConstructor(repoInfo.RepoType);
EnsureDbAndMigrationTableExists(criteria.ProjectFilePath, repoInfo.RepoType, criteria.ConfigFilePath);
var updater = CreateSchemaUpdater(repoInfo.Assembly.Location, repoInfo.RepoType, criteria.ConfigFilePath);
updater.Execute(true, true);
//clean up
ProjectEvalutionHelper.FinishedWithProject(criteria.ProjectFilePath);
}
private static void AssertRepoHasEmptyConstructor(Type repoType)
{
if (!TypeHandler.DoesTypeHaveEmptyConstructor(repoType))
{
throw new ApplicationException(string.Format("Repo type '{0}' must have an empty constructor", repoType));
}
}
/// <summary>
/// Creates a CS file that inherits from BaseMigration that will execute the SQL schema changes.
/// </summary>
/// <param name="criteria">description of what to do and where to put the file</param>
public void CreateScript(CreationCriteria criteria)
{
var configurationStatus = GetMigrationConfigurationStatus(criteria.ProjectFileLocation, criteria.RepoName);
if (!configurationStatus.Enabled)
{
LoggerBase.Log("Migrations are not enabled, can not create any migrations.");
return;
}
if (configurationStatus.MigrationType != MigrationToUse.Manual)
{
LoggerBase.Log("Manual Migrations are not enabled, can not create manual migrations.");
return;
}
var repoInfo = TypeHandler.FindSingleRepo(criteria.ProjectFileLocation, criteria.RepoName);
//if null we need to drop out.
if (repoInfo == null)
{
LoggerBase.Log("Unable to find repo");
return;
}
AssertRepoHasEmptyConstructor(repoInfo.RepoType);
EnsureDbAndMigrationTableExists(criteria.ProjectFileLocation, repoInfo.RepoType, criteria.ConfigFilePath);
//ensure that we have the case correct.
criteria.RepoName = repoInfo.RepoType.Name;
var configuration = TypeHandler.FindConfiguration(criteria.ProjectFileLocation, repoInfo.RepoType);
//if null something bad happend, drop out
if (configuration == null)
{
LoggerBase.Log("unable to find configuration file");
return;
}
var updater = CreateSchemaUpdater(repoInfo.Assembly.Location, repoInfo.RepoType, criteria.ConfigFilePath);
var fileMigrationHandler = new MigrationFileHandler(updater);
var projectFileHandler = new ProjectDteHelper();
//set the mgiration folder form config:
criteria.MigrationPath = configuration.RootMigrationFolder;
var filePath = fileMigrationHandler.CreateFile(criteria);
projectFileHandler.AddFile(criteria.ProjectFileLocation, configuration.RootMigrationFolder, filePath, showFile: true);
LoggerBase.Log("Created migration file.");
//clean up
ProjectEvalutionHelper.FinishedWithProject(criteria.ProjectFileLocation);
}
/// <summary>
/// Applies all migrations for the given repository.
/// </summary>
/// <param name="criteria"></param>
public void ApplyMigrations(ApplyMigrationCriteria criteria)
{
var configurationStatus = GetMigrationConfigurationStatus(criteria.ProjectPath, criteria.RepoName);
if (!configurationStatus.Enabled)
{
LoggerBase.Log("Migrations are not enabled, can not apply any migrations.");
return;
}
if (configurationStatus.MigrationType != MigrationToUse.Manual)
{
LoggerBase.Log("Manual Migrations are not enabled, can not apply any migrations.");
return;
}
var repoInfo = TypeHandler.FindSingleRepo(criteria.ProjectPath, criteria.RepoName);
//if null we need to drop out.
if (repoInfo == null) return;
AssertRepoHasEmptyConstructor(repoInfo.RepoType);
EnsureDbAndMigrationTableExists(criteria.ProjectPath, repoInfo.RepoType, criteria.ConfigFilePath);
var runner = new MigrationRunner();
runner.ApplyMigrations(criteria);
//clean up
ProjectEvalutionHelper.FinishedWithProject(criteria.ProjectPath);
}
private ConfigurationStatus GetMigrationConfigurationStatus(string projectPath, string optionalRepo)
{
var status = new ConfigurationStatus();
var configObject = TypeHandler.FindConfiguration(projectPath, optionalRepo);
if (configObject == null)
{
status.Enabled = false;
return status;
}
status.Enabled = configObject.Enabled;
status.MigrationType = configObject.MigrationType;
return status;
}
/// <summary>
/// Creates an instance of the NHibernate SchemaUpdate class using the repository found.
/// </summary>
/// <param name="projectdllPath"></param>
/// <param name="repoType"></param>
/// <param name="args">optional constructor arguments</param>
/// <returns></returns>
private SchemaUpdate CreateSchemaUpdater(string projectdllPath, Type repoType, string configFilePath, params object[] args)
{
var repoBase = TypeHandler.CreateRepoBase(projectdllPath, repoType, args);
MethodInfo createRepoSetupMethod = repoType.GetMethod("CreateRepoSetup", BindingFlags.Instance | BindingFlags.NonPublic);
var connectionString = ConnectionStringHandler.FindConnectionString(repoBase, configFilePath);
var repoSetup = createRepoSetupMethod.Invoke(repoBase, new object[] { connectionString });
var createConfigMethod = repoSetup.GetType().GetMethod("CreateConfiguration", BindingFlags.Instance | BindingFlags.NonPublic);
var config = createConfigMethod.Invoke(repoSetup, null) as FluentConfiguration;
var updater = new SchemaUpdate(config.BuildConfiguration());
return updater;
}
/// <summary>
/// Ensures that the migration database exists.
/// </summary>
/// <param name="projectdllPath"></param>
/// <param name="repoType"></param>
/// <param name="configFilePath"></param>
/// <param name="args"></param>
private void CreateRepoDatabase(string projectdllPath, Type repoType, string configFilePath, params object[] args)
{
var repoBase = TypeHandler.CreateRepoBase(projectdllPath, repoType, args);
var connectionString = ConnectionStringHandler.FindConnectionString(repoBase, configFilePath);
var builder = new System.Data.SqlClient.SqlConnectionStringBuilder
{
ConnectionString = connectionString
};
string databaseName = builder.InitialCatalog;
var migrationDbExists = DatabaseChecking.CheckDatabaseExists(connectionString, databaseName);
if (!migrationDbExists)
{
DatabaseCreation.CreateDatabase(connectionString, databaseName);
}
}
private void EnsureDbAndMigrationTableExists(string projectdllPath, Type repoType, string configFilePath)
{
var repoBase = TypeHandler.CreateRepoBase(projectdllPath, repoType); //this might blow up.. might need "args"
var connectionString = ConnectionStringHandler.FindConnectionString(repoBase, configFilePath);
CreateRepoDatabase(projectdllPath, repoType, configFilePath);
//create migration log table, if it doesn't exist.
var updateMigration = CreateSchemaUpdater(projectdllPath, typeof(MigrationRepo), configFilePath, connectionString);
updateMigration.Execute(true, true);
}
}
}
|
using Sudoku.Models;
using Sudoku.Services.Business;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Sudoku.Controllers
{
public class GameBoardController : Controller
{
SudokuService sudoku = new SudokuService();
PuzzleLoader load = new PuzzleLoader();
PuzzleSaver save = new PuzzleSaver();
// GET: GameBoard
public ActionResult Index()
{
FullBoard board = new FullBoard() { GameBoard = sudoku.buildBoard() };
int puzzleNumber;
load.LoadNewPuzzle(board.GameBoard, out puzzleNumber);
board.BoardNumber = puzzleNumber;
return View("GameBoard", board);
}
public ActionResult UpdateGame(FullBoard board)
{
board.Status = sudoku.GetPuzzleStatus(board.GameBoard);
return View("GameBoard", board);
}
public ActionResult SaveGame(FullBoard board)
{
save.SaveGame(board.GameBoard, board.BoardNumber);
board.Status = sudoku.GetPuzzleStatus(board.GameBoard);
return View("GameBoard", board);
}
public ActionResult LoadGame()
{
FullBoard board = new FullBoard() { GameBoard = sudoku.buildBoard() };
int puzzleNumber;
load.LoadSavedPuzzle(board.GameBoard, out puzzleNumber);
board.Status = sudoku.GetPuzzleStatus(board.GameBoard);
board.BoardNumber = puzzleNumber;
return View("GameBoard", board);
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace TestAbp.WebApi.Controllers
{
[Route("~/")]
public class HomeController : AbpController
{
[HttpGet]
public IActionResult Index()
{
return Redirect("~/swagger/index.html");
}
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.SceneManagement;
using System.IO;
namespace MileCode {
public class LightEnvManager : Editor {
public static List<LightEnv> lightEnvsFound = new List<LightEnv>();
[MenuItem("Scene/Export LightEnv")]
public static void ExportLightEnv() {
string sceneName = SceneManager.GetActiveScene().name;
if(sceneName == "") {
Debug.Log("The scene is not saved.");
return;
}
LightEnv lightEnv = CreateLightEnv(sceneName);
AssetDatabase.CreateAsset(lightEnv, "Assets/ModelViewer/LightEnv/" + lightEnv.sceneName + "_" + System.DateTime.Now.ToString("MMddHHmmss") + "_lightEnv" + ".asset");
}
private static LightEnv CreateLightEnv(string sceneName) {
LightEnv lightEnv = ScriptableObject.CreateInstance<LightEnv>();
lightEnv.sceneName = sceneName;
lightEnv.SaveLightParams();
lightEnv.SaveEnvironmentLighting();
lightEnv.SaveReflectionProbe();
lightEnv.SaveAdditionalProbes();
return lightEnv;
}
public static void Apply(LightEnv lightEnv) {
LightEnv.TurnOffSavedLightEnv();
LightEnvManager.TurnOffAllTempLightsExcept(lightEnv);
lightEnv.UseLightFromScriptObject();
lightEnv.UseEnvironmentLightFromScriptObject();
lightEnv.UseReflectionProbeFromScriptObject();
lightEnv.GetEnvironmentLightingDone();
}
/*
public static bool GetEnvironmentLightingDone(LightEnv lightEnv) {
LightmapEditorSettings.lightmapper = LightmapEditorSettings.Lightmapper.ProgressiveGPU;
LightmapEditorSettings.bakeResolution = 10;
Lightmapping.giWorkflowMode = Lightmapping.GIWorkflowMode.Iterative;
Lightmapping.bakeCompleted += TurnOffAutoGenerate;
lightEnv.AfterLightingDone();
return true;
}
public static IEnumerator JustWaitAndRun(float seconds) {
yield return new EditorWaitForSeconds(seconds);
}
private static void TurnOffAutoGenerate() {
JustWaitAndRun(1.0f);
Lightmapping.giWorkflowMode = Lightmapping.GIWorkflowMode.OnDemand;
Lightmapping.bakeCompleted -= TurnOffAutoGenerate;
}
*/
public static void TurnOffAllTempLightsExcept(LightEnv lightEnvInUse) {
foreach(LightEnv lightEnv in lightEnvsFound) {
if(lightEnv.name != lightEnvInUse.name) {
//Debug.Log(lightEnv.name + "_off");
lightEnv.RemoveTempLight();
} else {
//Debug.Log(lightEnv.name + "_on");
}
}
}
public static void TurnOffAllTempLights() {
if(lightEnvsFound != null && lightEnvsFound.Count >= 1) {
foreach(LightEnv lightEnv in lightEnvsFound) {
if(lightEnv != null) {
lightEnv.RemoveTempLight();
}
}
}
}
public static void LoadLightEnv() {
lightEnvsFound.Clear();
string lightEnvsFolder = "Assets/ModelViewer/LightEnv";
bool lightEnvsFolderExists = Directory.Exists(lightEnvsFolder);
if(lightEnvsFolderExists) {
string[] lightEnvPaths = Directory.GetFiles(lightEnvsFolder);
if(lightEnvPaths.Length >= 1) {
foreach(string lightEnvPath in lightEnvPaths) {
if(lightEnvPath.EndsWith("_lightEnv.asset")) {
LightEnv lightEnv = AssetDatabase.LoadAssetAtPath<LightEnv>(lightEnvPath);
lightEnvsFound.Add(lightEnv);
//Debug.Log(lightEnvPath);
}
}
} else {
Debug.Log("Can't find any lightEnv");
}
} else {
Debug.Log("Can't find lightEnv folder");
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace thuankskShop.Model.Models
{
[Table("Oderss")]
public class Oders
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ID { get; set; }
[Required]
[MaxLength(256)]
public string CustomerName { get; set; }
[Required]
[MaxLength(256)]
public string CustomerNameADress { get; set; }
[Required]
[MaxLength(256)]
public string CustomerNameEmail { get; set; }
[Required]
[MaxLength(50)]
public string CustomerNameMobile { get; set; }
[Required]
[MaxLength(256)]
public string CustomerNameMessege { get; set; }
[MaxLength(256)]
public string PaymentMethod { get; set; }
public string CreateDate { get; set; }
public string CreateBy { get; set; }
public string PaymentSatus { get; set; }
public bool Status { get; set; }
public virtual IEnumerable<OderDetails> OderDetailss { set; get; }
}
}
|
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace ScoutingModels.Extentions
{
public static class DateTimeExtentions
{
public static int GetWeekNumber(this DateTime date)
{
return GetWeekNumber(date, CultureInfo.CurrentCulture);
}
public static int GetWeekNumber(this DateTime date, CultureInfo culture)
{
return culture.Calendar.GetWeekOfYear(date,
culture.DateTimeFormat.CalendarWeekRule,
culture.DateTimeFormat.FirstDayOfWeek);
}
public static int GetWeekNumberOfMonth(this DateTime date)
{
return GetWeekNumberOfMonth(date, CultureInfo.CurrentCulture);
}
public static int GetWeekNumberOfMonth(this DateTime date, CultureInfo culture)
{
return date.GetWeekNumber(culture)
- new DateTime(date.Year, date.Month, 0).
GetWeekNumber(culture);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace NameSorter
{
public class Program
{
static void Main(string[] args)
{
var nameSorter = new NameSorter(args);
nameSorter.Run();
}
}
}
|
using System;
public interface IBlockModel
{
BlockData GetBlockData();
void SubscribeToUpdateModel(Action action);
void UpdateModel();
}
|
using System.ComponentModel.DataAnnotations;
namespace API.Model
{
public class Role
{
[Key]
public int Id { get; set; }
[Required]
[MaxLength(50)]
public string Nom { get; set; }
}
} |
public static class ActionNames
{
public const string Stop = "stop";
public const string Pause = "pause";
public const string Resume = "resume";
} |
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Levels : MonoBehaviour
{
public Dictionary<int, Vector3> levels = new Dictionary<int, Vector3>()
{
{ 0, new Vector3(-65f, 0f, 0f) },
{ 1, new Vector3(65f, 0f, 0f) },
{ 2, new Vector3(0f, 0f, 0f) }
};
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum PlayerTag
{
Player1,
Player2,
Player3,
Player4,
None
}
|
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Completion;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.Text;
using System;
using System.Composition.Hosting;
using System.Linq;
using System.Threading.Tasks;
namespace CompletionDemo
{
class Program
{
async static Task Main(string[] args)
{
// default assemblies are
// "Microsoft.CodeAnalysis.Workspaces",
// "Microsoft.CodeAnalysis.CSharp.Workspaces",
// "Microsoft.CodeAnalysis.VisualBasic.Workspaces",
// "Microsoft.CodeAnalysis.Features",
// "Microsoft.CodeAnalysis.CSharp.Features",
// "Microsoft.CodeAnalysis.VisualBasic.Features"
// http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/Workspace/Host/Mef/MefHostServices.cs,126
var host = MefHostServices.Create(MefHostServices.DefaultAssemblies);
var workspace = new AdhocWorkspace(host);
var code = @"using System;
public class MyClass
{
public static void MyMethod(int value)
{
Guid.
}
}";
var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "MyProject", "MyProject", LanguageNames.CSharp).
WithMetadataReferences(new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) });
var project = workspace.AddProject(projectInfo);
var document = workspace.AddDocument(project.Id, "MyFile.cs", SourceText.From(code));
await PrintCompletionResults(document, code.LastIndexOf("Guid.") + 5);
Console.WriteLine();
Console.WriteLine("*****");
Console.WriteLine();
// SCRIPT VERSION
var scriptCode = "Guid.N";
var compilationOptions = new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary,
usings: new[] { "System" });
var scriptProjectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(), "Script", "Script", LanguageNames.CSharp,
isSubmission: true)
.WithMetadataReferences(new[] { MetadataReference.CreateFromFile(typeof(object).Assembly.Location) })
.WithCompilationOptions(compilationOptions);
var scriptProject = workspace.AddProject(scriptProjectInfo);
var scriptDocumentInfo = DocumentInfo.Create(
DocumentId.CreateNewId(scriptProject.Id), "Script",
sourceCodeKind: SourceCodeKind.Script,
loader: TextLoader.From(TextAndVersion.Create(SourceText.From(scriptCode), VersionStamp.Create())));
var scriptDocument = workspace.AddDocument(scriptDocumentInfo);
await PrintCompletionResults(scriptDocument, scriptCode.Length - 1);
Console.ReadLine();
}
private static async Task PrintCompletionResults(Document document, int position)
{
var completionService = CompletionService.GetService(document);
var results = await completionService.GetCompletionsAsync(document, position);
foreach (var i in results.Items)
{
Console.WriteLine(i.DisplayText);
foreach (var prop in i.Properties)
{
Console.Write($"{prop.Key}:{prop.Value} ");
}
Console.WriteLine();
foreach (var tag in i.Tags)
{
Console.Write($"{tag} ");
}
Console.WriteLine();
Console.WriteLine();
}
}
}
}
|
using UnityEngine;
using System.Collections;
using GameFrame;
public class HeroDriveMoving : GameBehaviour
{
Rigidbody m_rigidbody = null;
Vector3 m_velocity = Vector3.zero;
Hero m_hero = GameApp.GetInstance().m_hero;
Vector3 m_relativePos = new Vector3(5, 10, 10);
Quaternion m_rotation;
protected override void Init()
{
m_rigidbody = GetComponent<Rigidbody>();
}
public void Move()
{
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
if (Mathf.Abs(h) > 0.05f || Mathf.Abs(v) > 0.05f)
{
m_velocity.x = -h * GameApp.GetInstance().m_hero.m_speed;
m_velocity.z = -v * GameApp.GetInstance().m_hero.m_speed;
transform.rotation = Quaternion.LookRotation(m_velocity);
m_velocity.y = m_rigidbody.velocity.y;
m_rigidbody.velocity = m_velocity;
}
else
{
StopMove();
}
}
public void StopMove()
{
m_velocity = Vector3.zero;
m_velocity.y = m_rigidbody.velocity.y;
m_rigidbody.velocity = m_velocity;
m_rotation = transform.rotation;
m_rotation.x = 0;
m_rotation.z = 0;
transform.rotation = m_rotation;
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http.Filters;
using System.Web.Http.ModelBinding;
//**********************************************************************
//
// 文件名称(File Name):WebApiActionFilterAttribute.CS
// 功能描述(Description):
// 作者(Author):Aministrator
// 日期(Create Date): 2017-05-24 13:17:19
//
// 修改记录(Revision History):
// R1:
// 修改作者:
// 修改日期:2017-05-24 13:17:19
// 修改理由:
//**********************************************************************
namespace ND.FluentTaskScheduling.WebApi.Filters
{
public class WebApiValidateActionFilterAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext actionContext)
{
if (!actionContext.ModelState.IsValid)
{
//actionContext.Response = actionContext.Request.CreateResponse(
// HttpStatusCode.BadRequest, new ApiResourceValidationErrorWrapper(actionContext.ModelState));
}
// base.OnActionExecuting(actionContext);
}
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InfectionCard : Card
{
public InfectionCard(Location loc, int id, string name){
this.Location = loc;
this.id = id;
this.name = name;
if (loc != null) colour = loc.Colour;
else{
if (id == Vals.EPIDEMIC){
colour = Vals.Colour.EPIDEMIC;
}
else{
colour = Vals.Colour.EVENT;
}
}
}
public string toString(){
return name;
}
}
|
using System;
using System.Net.Sockets;
namespace FractionCalculator
{
class FractionCalculator
{
static void Main()
{
try
{
//Console.WriteLine(long.MaxValue);
Fraction fraction1 = new Fraction(22, 7);
Fraction fraction2 = new Fraction(40, 4);
Fraction result = fraction1 + fraction2;
Console.WriteLine(result.Numerator);
Console.WriteLine(result.Denominator);
Console.WriteLine(result);
Fraction fraction3 = new Fraction(9223372036854775807, 745415184684);
Fraction fraction4 = new Fraction(9223372036854775807, -9223372036854775808);
Fraction result2 = fraction3 + fraction4;
Console.WriteLine(result2.Numerator);
Console.WriteLine(result2.Denominator);
Console.WriteLine(result2);
}
catch (DivideByZeroException ex)
{
Console.Error.WriteLine(ex.Message);
}
catch (ArgumentOutOfRangeException ex)
{
Console.Error.WriteLine(ex.Message);
}
}
}
}
|
using Microsoft.AspNetCore.Http;
namespace NetEscapades.AspNetCore.SecurityHeaders.Headers
{
/// <summary>
/// The header value to use for XSS-Protection
/// </summary>
public class XssProtectionHeader : DocumentHeaderPolicyBase
{
private readonly string _value;
/// <summary>
/// Initializes a new instance of the <see cref="XssProtectionHeader"/> class.
/// </summary>
/// <param name="value">The value to apply for the header</param>
public XssProtectionHeader(string value)
{
_value = value;
}
/// <inheritdoc />
public override string Header { get; } = "X-XSS-Protection";
/// <inheritdoc />
protected override string GetValue(HttpContext context) => _value;
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using FallstudieSem5.Models.Repository;
using Microsoft.EntityFrameworkCore;
namespace FallstudieSem5.Models.Manager
{
public class TitleManager : IDataRepository<Title>
{
readonly Context _titleContext;
public TitleManager(Context context)
{
_titleContext = context;
}
public IEnumerable<Title> GetAll()
{
return _titleContext.Titles.ToList();
}
public Title Get(long id)
{
return _titleContext.Titles
.FirstOrDefault(t => t.TitleId == id);
}
public void Add(Title entity)
{
_titleContext.Titles.Add(entity);
_titleContext.SaveChanges();
}
public void Update(Title title, Title entity)
{
title.Description = entity.Description;
_titleContext.SaveChanges();
}
public void Delete(Title title)
{
_titleContext.Titles.Remove(title);
_titleContext.SaveChanges();
}
}
}
|
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace ACS
{
public class Agv
{
/// <summary>
/// 小车编号
/// </summary>
public string agvNo;
/// <summary>
/// 小车当前的码值
/// </summary>
public string barcode;
/// <summary>
/// 小车状态
/// </summary>
public AgvState state;
/// <summary>
/// 小车是否可用
/// </summary>
public bool isEnable;
/// <summary>
/// 小车当前电量
/// </summary>
public float currentCharge;
/// <summary>
/// 小车当前的顶升状态
/// </summary>
public HeightEnum height;
/// <summary>
/// 小车当前子任务列表
/// </summary>
public List<STask> sTaskList;
public int errorMsg;
public string areaNo;
}
}
|
using NfePlusAlpha.Application.ViewModels.Apoio;
using NfePlusAlpha.Domain.Entities;
using NfePlusAlpha.Infra.Data.Classes;
using NfePlusAlpha.Infra.Data.Retorno;
using NfePlusAlpha.Services.Correios.Classes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NfePlusAlpha.Application.ViewModels.ViewModel
{
public class TransportadoraViewModel : ViewModelBase
{
#region CONSTRUTOR
public TransportadoraViewModel()
{
this.objTransportadora = new tbTransportadora();
this.blnCodigoEnabled = true;
this.arrCidades = new List<tbCidade>();
}
#endregion CONSTRUTOR
#region PROPRIEDADES
public tbTransportadora objTransportadora { get; set; }
public int tra_codigo
{
get { return this.objTransportadora.tra_codigo; }
set
{
this.objTransportadora.tra_codigo = value;
RaisePropertyChanged("tra_codigo");
}
}
[Required(ErrorMessage = "CPF/CNPJ obrigatório.")]
[MaxLength(18, ErrorMessage = "Máximo de 14 caracteres")]
public string tra_cnpj
{
get { return this.objTransportadora.tra_cnpj; }
set
{
this.objTransportadora.tra_cnpj = value;
RaisePropertyChanged("tra_cnpj");
ValidaErro(value);
ValidaCpfCnpj(value);
}
}
[Required(ErrorMessage = "Nome/Razao Social obrigatório.")]
[MaxLength(200, ErrorMessage = "Máximo de 200 caracteres")]
public string tra_razaoSocial
{
get { return this.objTransportadora.tra_razaoSocial; }
set
{
this.objTransportadora.tra_razaoSocial = value;
RaisePropertyChanged("tra_razaoSocial");
ValidaErro(value);
}
}
[Required(ErrorMessage = "RG/IE obrigatório.")]
[MaxLength(20, ErrorMessage = "Máximo de 20 caracteres")]
public string tra_inscricaoEstadual
{
get { return this.objTransportadora.tra_inscricaoEstadual; }
set
{
this.objTransportadora.tra_inscricaoEstadual = value;
RaisePropertyChanged("tra_inscricaoEstadual");
ValidaErro(value);
}
}
[Required(ErrorMessage = "CEP obrigatório.")]
[MaxLength(8, ErrorMessage = "Máximo de 8 caracteres")]
public string tra_enderecoCep
{
get { return this.objTransportadora.tra_enderecoCep; }
set
{
try
{
if (this.objTransportadora.tra_enderecoCep != value)
{
ConsultaCep objConsultaCep = new ConsultaCep(value);
if (objConsultaCep.BlnEncontrou)
{
this.tra_enderecoLogradouro = objConsultaCep.Lagradouro;
this.tra_enderecoBairro = objConsultaCep.Bairro;
int? intCod = this.arrEstados.Where(e => e.est_sigla.ToUpper() == objConsultaCep.UF.ToUpper()).Select(e => e.est_codigo).FirstOrDefault();
if (intCod > 0)
this.intEstadoCodigo = intCod.Value;
if (arrCidades != null && arrCidades.Count > 0)
{
intCod = arrCidades.Where(c => c.cid_descricao.ToUpper() == objConsultaCep.Cidade.ToUpper()).Select(c => c.cid_codigo).FirstOrDefault();
if (intCod != null)
this.cid_codigo = intCod.Value;
}
//txtCidade.Text = resultado.cidade;
//txtEstado.Text = resultado.uf;
}
}
}
catch
{
}
finally
{
this.objTransportadora.tra_enderecoCep = value;
RaisePropertyChanged("tra_enderecoCep");
ValidaErro(value);
}
}
}
[Required(ErrorMessage = "Logradouro obrigatório.")]
[MaxLength(200, ErrorMessage = "Máximo de 200 caracteres")]
public string tra_enderecoLogradouro
{
get { return this.objTransportadora.tra_enderecoLogradouro; }
set
{
this.objTransportadora.tra_enderecoLogradouro = value;
RaisePropertyChanged("tra_enderecoLogradouro");
ValidaErro(value);
}
}
[Required(ErrorMessage = "Número obrigatório.")]
[MaxLength(10, ErrorMessage = "Máximo de 10 caracteres")]
public string tra_enderecoNumero
{
get { return this.objTransportadora.tra_enderecoNumero; }
set
{
this.objTransportadora.tra_enderecoNumero = value;
RaisePropertyChanged("tra_enderecoNumero");
ValidaErro(value);
}
}
[MaxLength(200, ErrorMessage = "Máximo de 200 caracteres")]
public string tra_enderecoComplemento
{
get { return this.objTransportadora.tra_enderecoComplemento; }
set
{
this.objTransportadora.tra_enderecoComplemento = value;
RaisePropertyChanged("tra_enderecoComplemento");
ValidaErro(value);
}
}
[Required(ErrorMessage = "Bairro obrigatório.")]
[MaxLength(100, ErrorMessage = "Máximo de 100 caracteres")]
public string tra_enderecoBairro
{
get { return this.objTransportadora.tra_enderecoBairro; }
set
{
this.objTransportadora.tra_enderecoBairro = value;
RaisePropertyChanged("tra_enderecoBairro");
ValidaErro(value);
}
}
private bool _blnCodigoEnabled;
public bool blnCodigoEnabled
{
get { return _blnCodigoEnabled; }
set
{
_blnCodigoEnabled = value;
RaisePropertyChanged("blnCodigoEnabled");
ValidaErro(value);
}
}
public List<tbEstado> arrEstados
{
get
{
List<tbEstado> _arrEstados = new List<tbEstado>();
NfePlusAlphaRetorno objRetorno;
using (Estado objEstado = new Estado())
{
objRetorno = objEstado.ObterTodos();
}
if (objRetorno.blnTemErro == false && objRetorno.objRetorno != null)
_arrEstados = (List<tbEstado>)objRetorno.objRetorno;
return _arrEstados;
}
set
{
}
}
private int _intEstadoCodigo;
public int intEstadoCodigo
{
get
{
return _intEstadoCodigo;
}
set
{
if (value > 0)
{
_intEstadoCodigo = value;
List<tbCidade> _arrCidades = new List<tbCidade>();
if (_intEstadoCodigo > 0)
{
NfePlusAlphaRetorno objRetorno;
using (Cidade objCidade = new Cidade())
{
objRetorno = objCidade.ObterCidadesPorEstado(_intEstadoCodigo);
}
if (objRetorno.blnTemErro == false && objRetorno.objRetorno != null)
{
this.arrCidades = (List<tbCidade>)objRetorno.objRetorno;
}
}
RaisePropertyChanged("intEstadoCodigo");
ValidaErro(value);
}
}
}
private List<tbCidade> _arrCidades;
public List<tbCidade> arrCidades
{
get
{
return _arrCidades;
}
set
{
_arrCidades = value;
RaisePropertyChanged("arrCidades");
ValidaErro(value);
}
}
public int cid_codigo
{
get
{
return this.objTransportadora.cid_codigo;
}
set
{
this.objTransportadora.cid_codigo = value;
this.objTransportadora.tbCidade = new tbCidade { cid_codigo = value };
RaisePropertyChanged("cid_codigo");
ValidaErro(value);
}
}
#endregion PROPRIEDADES
#region METODOS
public void Salvar(out string strMensagem)
{
strMensagem = string.Empty;
this.AtualizaErrosViewModel();
if (!this.HasErrors)
{
NfePlusAlphaRetorno objRetorno;
using (Transportadora objBll = new Transportadora())
{
objRetorno = objBll.Salvar(this.objTransportadora);
}
if (objRetorno.blnTemErro)
strMensagem = objRetorno.strMensagemErro;
else
RaisePropertyChanged("tra_codigo");
}
else
strMensagem = Util.RetornaMensagemErro(this.RetornaTodosErros());
}
public void Excluir(out string strMensagem)
{
strMensagem = string.Empty;
NfePlusAlphaRetorno objRetorno;
using (Transportadora objBll = new Transportadora())
{
objRetorno = objBll.Excluir(this.objTransportadora.tra_codigo);
}
if (objRetorno.blnTemErro)
strMensagem = objRetorno.strMensagemErro;
}
public NfePlusAlphaRetorno ObterTransportadora(int intCodigo, enDirecao? enDirecao)
{
NfePlusAlphaRetorno objRetorno;
using (Transportadora objBll = new Transportadora())
{
objRetorno = objBll.ObterPorCodigo(intCodigo, enDirecao);
}
return objRetorno;
}
public NfePlusAlphaRetorno ObterListaTransportadora(string strTextoPesquisa)
{
NfePlusAlphaRetorno objRetorno;
using (Transportadora objBll = new Transportadora())
{
objRetorno = objBll.ObterListaTransportadora(strTextoPesquisa);
}
return objRetorno;
}
public void AtualizaErrosViewModel()
{
this.tra_cnpj = this.objTransportadora.tra_cnpj;
this.tra_razaoSocial = this.objTransportadora.tra_razaoSocial;
this.tra_inscricaoEstadual = this.objTransportadora.tra_inscricaoEstadual;
this.tra_enderecoCep = this.objTransportadora.tra_enderecoCep;
this.tra_enderecoLogradouro = this.objTransportadora.tra_enderecoLogradouro;
this.tra_enderecoNumero = this.objTransportadora.tra_enderecoNumero;
this.tra_enderecoBairro = this.objTransportadora.tra_enderecoBairro;
this.cid_codigo = this.objTransportadora.cid_codigo;
}
#endregion METODOS
}
}
|
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using VoxelSpace.UI;
using VoxelSpace.Resources;
namespace VoxelSpace {
public class HUD : UI.UI {
public PlayerEntity Player;
NinePatch _inventoryPatch;
Image _crosshair;
TileFont _font;
public HUD(float height, Skin skin) : base(height, skin) {
var assets = G.Assets;
_font = assets.GetAsset<TileFont>("core:ui.font2");
_inventoryPatch = assets.GetAsset<NinePatch>("core:ui.inventory");
_crosshair = assets.GetAsset<Image>("core:ui.crosshair");
}
protected override void DrawUI() {
float iconSize = 32;
// DrawVoxelType(_player.VoxelTypeToPlace, Anchors.TopRight - new Vector2(-iconSize, 0), iconSize);
var rect = new Rect(Anchors.BottomRight + new Vector2(-2, -2) * iconSize, iconSize);
if (Player != null) {
Draw(Player.VoxelTypeToPlace.VoxelIconMesh, rect);
}
// rect = new Rect(new Vector2(), new Vector2(64, 24));
rect = new Rect(Anchors.BottomCenter + new Vector2(-195/2f, -26), new Vector2(195, 22));
Draw(_inventoryPatch, rect);
rect = new Rect(Anchors.MidCenter - new Vector2(4, 4), new Vector2(8, 8));
Draw(_crosshair, rect);
rect = new Rect(Anchors.TopLeft + new Vector2(31, 31), new Vector2(98, 18));
// TextBox("test", rect, ref _inputText);
// DrawString(_font, Anchors.MidCenter, "The Quick Brown Fox\nJumps Over The Lazy Dog.", HorizontalAlign.Center, VerticalAlign.Middle);
DrawString(_font, Anchors.BottomCenter + new Vector2(-1, -7), "64", HorizontalAlign.Right, VerticalAlign.Bottom);
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FrbaOfertas.Model
{
public class Direccion
{
public List<String> atributesModify = new List<string>();
private Int32 _id_domicilio;
private String _dom_calle;
private String _dom_numero ;
private Int32? _dom_depto;
private Int32? _dom_piso;
private String _dom_ciudad;
private String _dom_localidad;
private String _dom_codigo_postal;
public Int32 id_domicilio { get { return this._id_domicilio; } set { this._id_domicilio = value; atributesModify.Add("id_domicilio"); } }
[System.ComponentModel.DisplayName("Calle")]
public String dom_calle { get { return this._dom_calle; } set { this._dom_calle = value; atributesModify.Add("dom_calle"); } }
[System.ComponentModel.DisplayName("Numero")]
public String dom_numero { get { return this._dom_numero; } set { this._dom_numero = value; atributesModify.Add("dom_numero"); } }
[System.ComponentModel.DisplayName("Depto")]
public Int32? dom_depto { get { return this._dom_depto; } set { this._dom_depto = value; atributesModify.Add("dom_depto"); } }
[System.ComponentModel.DisplayName("Piso")]
public Int32? dom_piso { get { return this._dom_piso; } set { this._dom_piso = value; atributesModify.Add("dom_piso"); } }
[System.ComponentModel.DisplayName("Ciudad")]
public String dom_ciudad { get { return this._dom_ciudad; } set { this._dom_ciudad = value; atributesModify.Add("dom_ciudad"); } }
[System.ComponentModel.DisplayName("Localidad")]
public String dom_localidad { get { return this._dom_localidad; } set { this._dom_localidad = value; atributesModify.Add("dom_localidad"); } }
[System.ComponentModel.DisplayName("Cod Postal")]
public String dom_codigo_postal { get { return this._dom_codigo_postal; } set { this._dom_codigo_postal = value; atributesModify.Add("dom_codigo_postal"); } }
public List<String> getAtributeMList()
{
return atributesModify.Distinct().ToList();
}
public void restartMList()
{
this.atributesModify.Clear() ;
}
public dynamic getMethodString(String methodName)
{
return this.GetType().GetProperty(methodName).GetValue(this, null); ;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using UnityEngine;
public enum Sex
{
Male,
Female
}
public class NameSet
{
public string given;
public string surname;
public NameSet(string given, string surname)
{
this.given = given;
this.surname = surname;
}
public override string ToString()
{
return given + " " + surname;
}
}
public static class RandomName
{
private static string filePath = "Assets/JSON/names.json";
[Serializable]
class NameList
{
public string[] boys;
public string[] girls;
public string[] last;
public NameList()
{
boys = new string[] { };
girls = new string[] { };
last = new string[] { };
}
}
static NameList nameList = null;
public static NameSet Generate()
{
Sex sex = (Sex)UnityEngine.Random.Range(0, 2);
return Generate(sex);
}
public static NameSet Generate(Sex sex)
{
if (nameList == null)
{
CreateNameList();
}
string given;
if (sex == Sex.Male)
{
given = nameList.boys[UnityEngine.Random.Range(0, nameList.boys.Length)];
}
else
{
given = nameList.girls[UnityEngine.Random.Range(0, nameList.girls.Length)];
}
string surname = nameList.last[UnityEngine.Random.Range(0, nameList.last.Length)];
return new NameSet(given, surname);
}
private static void CreateNameList()
{
StreamReader reader = new StreamReader(filePath);
string jsonString = reader.ReadToEnd();
nameList = JsonUtility.FromJson<NameList>(jsonString);
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class boardController : MonoBehaviour
{
[SerializeField] GameObject[] cutscenes;
[SerializeField] Text fugitiveInfo;
[SerializeField] Text statusText;
// Start is called before the first frame update
void Start()
{
int storyVar = PlayerPrefs.GetInt("story", 0);
if(storyVar == 0)
{
cutscenes[0].SetActive(true);
}
else if(storyVar == 7)
{
cutscenes[1].SetActive(true);
if(PlayerPrefs.GetInt("blacklist1Status", 0) == 0)
{
statusText.text = "ESCAPED";
statusText.color = new Color(1, 0.2f, 0.2f, 1);
fugitiveInfo.text = "NAME: Scott Merkill\nAGE: 54\nSTATUS: On the run\n\nINFORMATION: Scott learned to work on cars from his father and started his own workshop when he was 16. Later he found out that fixing cars is not that profitable and began smuggling cars, tobacco and illegal meds to the country. However, it didn't take long for him to get busted and be locked up for a few years in a cell. Afterwards he cut all the strings to the smuggling and continued his legal mechanic business until he received a call from Andrew Jenkins a few months back.";
}
else
{
statusText.text = "ARRESTED";
statusText.color = new Color(0, 0, 0.77f, 1);
fugitiveInfo.text = "NAME: Scott Merkill\nAGE: 54\nSTATUS: Apprehended\n\nINFORMATION: Scott learned to work on cars from his father and started his own workshop when he was 16. Later he found out that fixing cars is not that profitable and began smuggling cars, tobacco and illegal meds to the country. However, it didn't take long for him to get busted and be locked up for a few years in a cell. Afterwards he cut all the strings to the smuggling and continued his legal mechanic business until he received a call from Andrew Jenkins a few months back.";
}
}
}
// Update is called once per fram
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IRAP.BL.OPCGateway.Global.Entities
{
public class TKepwareTagCollection
{
private object lockObject = new object();
private List<TKepwareTag> items =
new List<TKepwareTag>();
public TKepwareTag this[int index]
{
get
{
if (index >= 0 && index < items.Count)
{
return items[index];
}
else
{
return null;
}
}
}
public int Count
{
get { return items.Count; }
}
public int Add(TKepwareTag item)
{
lock (lockObject)
{
if (item != null)
{
items.Add(item);
}
}
return items.Count;
}
public int Add(string itemTag)
{
lock (lockObject)
{
if (!string.IsNullOrEmpty(itemTag))
{
if (!itemTag.Contains("._"))
{
items.Add(
new TKepwareTag()
{
TagName = itemTag,
});
}
}
}
return items.Count;
}
public int Remove(TKepwareTag item)
{
lock (lockObject)
{
bool successed = false;
do
{
successed = items.Remove(item);
} while (successed);
}
return items.Count;
}
public void Clear()
{
items.Clear();
}
}
}
|
using System;
namespace EntMob_Xamarin
{
public interface INavigationService
{
void NavigateTo(string pageKey);
}
}
|
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class PlayerUIElement : MonoBehaviour {
[SerializeField]
private StatBar healthBar;
[SerializeField]
private Image playerIcon;
[SerializeField]
private Image playerColor;
[SerializeField]
private Image abilityIcon;
[SerializeField]
private Image weaponIcon;
[SerializeField]
private Text ammoCount;
//Setters
public void ChangeCurrentHealthValue(float health)
{
healthBar.SetCurrentValue(health);
}
public void ChangeMaxHealthValue(float health)
{
healthBar.SetMaxValue(health);
}
public void ChangePlayerIcon(Sprite sprite)
{
playerIcon.sprite = sprite;
}
public void ChangePlayerColor(Sprite sprite)
{
playerColor.sprite = sprite;
}
public void ChangeAbilityIcon(Sprite sprite)
{
abilityIcon.sprite = sprite;
}
public void ChangeWeaponIcon(Sprite sprite)
{
weaponIcon.sprite = sprite;
}
public void ChangeAmmoCount(string text, int size)
{
ammoCount.text = text;
ammoCount.fontSize = size;
}
}
|
using System;
using ManaMist.Controllers;
using ManaMist.Models;
using ManaMist.Players;
using ManaMist.Utility;
using Newtonsoft.Json;
namespace ManaMist.Actions
{
public class Action
{
public ActionType type { get; set; }
public Action(ActionType type)
{
this.type = type;
}
public virtual bool CanExecute(MapController mapController, Player player, Entity entity, Coordinate coordinate, Entity target)
{
return true;
}
public virtual void Execute(MapController mapController, Player player, Entity entity, Coordinate coordinate, Entity target)
{
}
}
public enum ActionType
{
MOVE, BUILD, HARVEST
}
public class ActionConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return objectType.IsSubclassOf(typeof(Action));
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
return serializer.Deserialize<Action>(reader);
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
Action action = (Action)value;
serializer.Serialize(writer, new Action(action.type), typeof(Action));
}
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(TerrainInfo))]
public class TerrainInfoInspector : Editor {
public override void OnInspectorGUI() {
//base.OnInspectorGUI();
Terrain mainTerrain = Terrain.activeTerrain;
TerrainAnalyzer ta;
if(mainTerrain == null) {
Debug.Log("can't find main terrain.");
return;
} else {
ta = new TerrainAnalyzer(mainTerrain);
}
if(GUILayout.Button("Check")) {
ta.GetTerrainSplatMaps();
}
}
}
|
using System.Collections.Generic;
using System.Linq;
namespace BetterFarmAnimalVariety.Models
{
public class AppSettings
{
public List<AppSetting> Settings;
public AppSettings(Dictionary<string, string> settings)
{
List<AppSetting> Settings = new List<AppSetting>();
foreach(KeyValuePair<string, string> Entry in settings)
{
Settings.Add(new AppSetting(Entry));
}
Settings = Settings.OrderBy(kvp => kvp.Value).ToList();
this.Settings = Settings;
}
public List<AppSetting> FindFarmAnimalAppSettings()
{
return this.Settings.FindAll(x => x.IsFarmAnimal());
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Regex___HW
{
public static class RegexQuest
{
}
}
|
namespace InstrumentationSample
{
public interface IAuthorizationService
{
void Authorise(AuthorizationRequest request);
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class Enemy : MonoBehaviour
{
public enum Type { A, B, C, D};
public Type enemyType;
public int maxHealth;
public int curHealth;
public int score;
public GameManager manager;
public Transform target;
public BoxCollider meleeArea;
public GameObject bullet;
public GameObject[] coins;
public bool isChase;
public bool isAttack;
public Rigidbody rigid;
public BoxCollider boxCollider;
public MeshRenderer[] meshs;
public NavMeshAgent nav;
public Animator anim;
void Awake() {
rigid = GetComponent<Rigidbody>();
boxCollider = GetComponent<BoxCollider>();
meshs = GetComponentsInChildren<MeshRenderer>();
nav = GetComponent<NavMeshAgent>();
anim = GetComponentInChildren<Animator>();
if(enemyType != Type.D)
Invoke("ChaseStart", 2);
}
void ChaseStart() {
isChase = true;
anim.SetBool("isWalk", true);
}
void Update() {
if(nav.enabled && enemyType != Type.D) {
nav.SetDestination(target.position);
nav.isStopped = !isChase;
}
}
void FreezeVelocity() {
if (isChase) {
rigid.velocity = Vector3.zero;
rigid.angularVelocity = Vector3.zero;
}
}
void Targeting() {
if (enemyType != Type.D)
{
float targetRadius = 1.5f;
float targetRange = 3f;
switch (enemyType)
{
case Type.A:
targetRadius = 1.5f;
targetRange = 3f;
break;
case Type.B:
targetRadius = 1f;
targetRange = 12f;
break;
case Type.C:
targetRadius = 0.5f;
targetRange = 25f;
break;
}
RaycastHit[] rayHits =
Physics.SphereCastAll(transform.position,
targetRadius,
transform.forward,
targetRange,
LayerMask.GetMask("Player"));
if (rayHits.Length > 0 && !isAttack)
{
StartCoroutine(Attack());
}
}
}
IEnumerator Attack() {
isChase = false;
isAttack = true;
anim.SetBool("isAttack", true);
switch (enemyType) {
case Type.A:
yield return new WaitForSeconds(0.2f);
meleeArea.enabled = true;
yield return new WaitForSeconds(1f);
meleeArea.enabled = false;
yield return new WaitForSeconds(1f);
break;
case Type.B:
yield return new WaitForSeconds(0.1f);
rigid.AddForce(transform.forward * 20, ForceMode.Impulse);
meleeArea.enabled = true;
yield return new WaitForSeconds(0.5f);
rigid.velocity = Vector3.zero;
meleeArea.enabled = false;
yield return new WaitForSeconds(2f);
break;
case Type.C:
yield return new WaitForSeconds(0.5f);
GameObject instantBullet = Instantiate(bullet, transform.position, transform.rotation);
Rigidbody rigidBullet = instantBullet.GetComponent<Rigidbody>();
rigidBullet.velocity = transform.forward * 20;
yield return new WaitForSeconds(2f);
break;
}
isChase = true;
isAttack = false;
anim.SetBool("isAttack", false);
}
void FixedUpdate() {
Targeting();
FreezeVelocity();
}
void OnTriggerEnter(Collider other) {
if (other.tag == "Melee") {
Weapon weapon = other.GetComponent<Weapon>();
curHealth -= weapon.damage;
Vector3 reactVec = transform.position - other.transform.position;
StartCoroutine(OnDamage(reactVec, false));
Debug.Log("Melee : " + curHealth);
}
else if (other.tag == "Bullet") {
Bullet bullet = other.GetComponent<Bullet>();
curHealth -= bullet.damage;
Vector3 reactVec = transform.position - other.transform.position;
Destroy(other.gameObject);
StartCoroutine(OnDamage(reactVec, false));
Debug.Log("Range : " + curHealth);
}
}
public void HitByGrenade(Vector3 explosionPos) {
curHealth -= 100;
Vector3 reactVec = transform.position - explosionPos;
StartCoroutine(OnDamage(reactVec, true));
}
IEnumerator OnDamage(Vector3 reactVec, bool isGrenade) {
foreach(MeshRenderer mesh in meshs)
mesh.material.color = Color.red;
yield return new WaitForSeconds(0.1f);
if(curHealth > 0) {
foreach(MeshRenderer mesh in meshs)
mesh.material.color = Color.white;
}
else {
foreach(MeshRenderer mesh in meshs)
mesh.material.color = Color.gray;
gameObject.layer = 14;
isChase = false;
nav.enabled = false;
anim.SetTrigger("doDie");
Player player = target.GetComponent<Player>();
player.score += score;
int ranCoin = Random.Range(0, 3);
Instantiate(coins[ranCoin], transform.position, Quaternion.identity);
switch(enemyType) {
case Type.A:
manager.enemyCntA--;
break;
case Type.B:
manager.enemyCntB--;
break;
case Type.C:
manager.enemyCntC--;
break;
}
if (isGrenade) {
reactVec = reactVec.normalized;
reactVec += Vector3.up * 3;
rigid.freezeRotation = false;
rigid.AddForce(reactVec * 5, ForceMode.Impulse);
rigid.AddTorque(reactVec * 15, ForceMode.Impulse);
}
else {
reactVec = reactVec.normalized;
reactVec += Vector3.up;
rigid.AddForce(reactVec * 5, ForceMode.Impulse);
}
if(enemyType != Type.D)
Destroy(gameObject, 4);
}
}
}
|
using HZH_Controls.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WordTree.Model;
using WordTree.Service;
namespace APP_Form
{
public delegate void SetType(string selectedtype);
public partial class SettingForm : FrmWithTitle
{
public SetType setType;
WordAndDicManager wordAndDicManager = WordAndDicManager.getInstance();
MemoryManager memoryManager = MemoryManager.getInstance();
public event Action<char, List<string>> updateRecord;
public SettingForm()
{
InitializeComponent();
}
private void SettingForm_Load(object sender, EventArgs e)
{
KeyValuePair<string, string>[] keyValuePairs = {new KeyValuePair<string, string>("0","CET4"),
new KeyValuePair<string, string>("1","CET6"),
new KeyValuePair<string, string>("2","TOEFL"),
new KeyValuePair<string, string>("3","IELTS"),
new KeyValuePair<string, string>("4","GRE"),
new KeyValuePair<string, string>("5","SAT")};
List<KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>(keyValuePairs);
cmbTargetDic.Source = list;
ntbNeedNum.Num = UserDefault.Default.NeedNum;//显示当前设置
if (UserDefault.Default.TargetDic != "")
{
cmbTargetDic.SelectedIndex = Convert.ToInt32(list.First(o => o.Value == UserDefault.Default.TargetDic).Key);
}
}
private void btnAffrim_BtnClick(object sender, EventArgs e)
{
try
{
wordAndDicManager.changeTargetDic(cmbTargetDic.SelectedText);
UserDefault.Default.TargetDic = cmbTargetDic.SelectedText;
memoryManager.NeedNum = (int)ntbNeedNum.Num;
UserDefault.Default.NeedNum = (int)ntbNeedNum.Num;
if (FrmDialog.ShowDialog(this, "设置成功!", "提示") == DialogResult.OK) {
setType(cmbTargetDic.SelectedText);
updateRecord('a', TakeRecord(memoryManager.NeedWord));
this.Close();
}
}catch(ApplicationException ex)
{
memoryManager.NeedNum = (int)ntbNeedNum.Num;
if (FrmDialog.ShowDialog(this, "设置成功!", "提示") == DialogResult.OK)
{
updateRecord('a', TakeRecord(memoryManager.NeedWord));
this.Close();
}
}
UserDefault.Default.Save();
}
private List<string> TakeRecord(PlannedWord[] NeedWords)
{
List<string> records = new List<string>();
if (NeedWords.Length > 0)
{
for (int i = 0; i < memoryManager.NeedNum; i++)
{
records.Add(NeedWords[i].Wordstr);
}
return records;
}
else
return records;
}
}
}
|
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Etherama.DAL.Models.Identity;
namespace Etherama.DAL.Models.Base
{
public abstract class DbBaseUserEntity : DbBaseEntity
{
[Column("user_id"), Required]
public long UserId { get; set; }
[ForeignKey(nameof(UserId))]
public virtual User User { get; set; }
}
}
|
using Model;
using Models.BasicSetup.Models;
using Models.Company.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Models.Customize.Models
{
public class ProdOrderHeaderStatus : EntityBase
{
[Key]
[ForeignKey("ProdOrderHeader")]
public int? ProdOrderHeaderId { get; set; }
public virtual ProdOrderHeader ProdOrderHeader { get; set; }
}
}
|
using Epam.Shops.BLL.Interfaces;
using Epam.Shops.DAL.Interfaces;
using Epam.Shops.Entities;
using Epam.Shops.Entities.Enums;
using Epam.Shops.Entities.Issues;
using Epam.Shops.Entities.Issues.Generic;
using Epam.Shops.Validation;
using System;
using System.Collections.Generic;
namespace Epam.Shops.BLL
{
public class UserLogic : IUserLogic
{
private IUserDAO _userDAO;
private UserValidator _validator;
public UserLogic(IUserDAO userDAO)
{
_userDAO = userDAO;
_validator = new UserValidator();
}
public Response Add(User newUser)
{
var response = new Response();
if (newUser is null)
{
response.Success = false;
response.Description = "Операция не выполнена";
response.Errors.Add("Отсутствует ссылка на объект пользователя");
return response;
}
var validateResult = _validator.Validate(newUser);
if (validateResult.IsValid)
{
if (!_userDAO.ContainsEmail(newUser.Email))
{
_userDAO.Add(newUser);
response.Success = true;
response.Description = "Операция выполнена успешно";
}
else
{
response.Success = false;
response.Description = "Ошибка добавления";
response.Errors.Add("Пользователь с таким email уже существует");
}
}
else
{
response.Success = false;
response.Description = "Ошибка валидации";
foreach (var error in validateResult.Errors)
{
response.Errors.Add(error.ErrorMessage);
}
}
return response;
}
public Response<bool> ContainsEmail(string email)
=> new Response<bool>()
{
Success = true,
Description = "Операция выполнена успешно",
Content = _userDAO.ContainsEmail(email)
};
public Response<IEnumerable<User>> GetAll()
=> new Response<IEnumerable<User>>()
{
Success = true,
Description = "Операция выполнена успешно",
Content = _userDAO.GetAll()
};
public Response<User> GetByEmail(string email)
{
var response = new Response<User>();
var user = _userDAO.GetByEmail(email);
if (user != null)
{
response.Success = true;
response.Description = "Операция выполнена успешно";
response.Content = user;
}
else
{
response.Success = false;
response.Description = "Операция не выполнена";
response.Errors.Add("Пользователь с таким email не найден");
}
return response;
}
public Response Remove(Guid id)
{
var response = new Response();
if (_userDAO.Remove(id))
{
response.Success = true;
response.Description = "Операция выполнена успешно";
}
else
{
response.Success = false;
response.Description = "Операция не выполнена";
response.Errors.Add("Объект не найден");
}
return response;
}
public Response Update(User user)
{
var response = new Response();
var validateResult = _validator.Validate(user);
if (validateResult.IsValid)
{
if (_userDAO.GetByEmail(user.Email).Id == user.Id)
{
if (_userDAO.Update(user))
{
response.Success = true;
response.Description = "Операция выполнена успешно";
}
else
{
response.Success = false;
response.Description = "Операция не выполнена";
response.Errors.Add("Объект не найден");
}
}
else
{
response.Success = false;
response.Description = "Ошибка обновления";
response.Errors.Add("Пользователь с таким email уже существует");
}
}
else
{
response.Success = false;
response.Description = "Ошибка валидации";
foreach (var error in validateResult.Errors)
{
response.Errors.Add(error.ErrorMessage);
}
}
return response;
}
}
}
|
using UnityEngine;
namespace DChild.Gameplay.Combat.StatusEffects
{
public struct StatusInflictionHandler
{
private GameObject m_status;
public StatusInflictionHandler(GameObject status)
{
m_status = status;
}
public T InflictStatus<T>(float duration) where T : MonoBehaviour, IStatusEffect
{
var statusEffect = m_status.GetComponent<T>();
if (statusEffect == null)
{
statusEffect = m_status.AddComponent<T>();
}
//statusEffect.Inflict(duration);
// Find a way to
return (T)statusEffect;
}
}
}
|
//Copyright © 2013 Dagorn Julien (julien.dagorn@gmail.com)
//This work is free. You can redistribute it and/or modify it under the
//terms of the Do What The Fuck You Want To Public License, Version 2,
//as published by Sam Hocevar. See the COPYING file for more details.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace ActionGroupManager
{
static class Style
{
public static GUIStyle ScrollViewStyle;
public static GUIStyle CloseButtonStyle;
public static GUIStyle ButtonToggleStyle;
public static GUIStyle ButtonToggleYellowStyle;
public static GUIStyle ButtonToggleGreenStyle;
public static GUIStyle ButtonToggleRedStyle;
public static GUIStyle LabelExpandStyle;
static bool UseKSPSkin = false;
static Style()
{
GUISkin baseSkin = UseKSPSkin ? HighLogic.Skin : GUI.skin;
ScrollViewStyle = new GUIStyle(baseSkin.scrollView);
ScrollViewStyle.padding = new RectOffset(1, 1, 1, 1);
CloseButtonStyle = new GUIStyle(baseSkin.button);
CloseButtonStyle.margin = new RectOffset(3, 3, 3, 3);
ButtonToggleStyle = new GUIStyle(baseSkin.button);
ButtonToggleStyle.margin = new RectOffset(baseSkin.button.margin.left, baseSkin.button.margin.right, 5, 5);
ButtonToggleStyle.fixedHeight = 25f;
ButtonToggleYellowStyle = new GUIStyle(ButtonToggleStyle);
ButtonToggleYellowStyle.normal.textColor = Color.yellow;
ButtonToggleYellowStyle.active.textColor = Color.yellow;
ButtonToggleYellowStyle.focused.textColor = Color.yellow;
ButtonToggleYellowStyle.hover.textColor = Color.yellow;
ButtonToggleYellowStyle.onNormal.textColor = Color.yellow;
ButtonToggleYellowStyle.onActive.textColor = Color.yellow;
ButtonToggleYellowStyle.onFocused.textColor = Color.yellow;
ButtonToggleYellowStyle.onHover.textColor = Color.yellow;
ButtonToggleGreenStyle = new GUIStyle(ButtonToggleStyle);
ButtonToggleGreenStyle.normal.textColor = Color.green;
ButtonToggleGreenStyle.active.textColor = Color.green;
ButtonToggleGreenStyle.focused.textColor = Color.green;
ButtonToggleGreenStyle.hover.textColor = Color.green;
ButtonToggleGreenStyle.onNormal.textColor = Color.green;
ButtonToggleGreenStyle.onActive.textColor = Color.green;
ButtonToggleGreenStyle.onFocused.textColor = Color.green;
ButtonToggleGreenStyle.onHover.textColor = Color.green;
ButtonToggleRedStyle = new GUIStyle(ButtonToggleStyle);
ButtonToggleRedStyle.normal.textColor = Color.red;
ButtonToggleRedStyle.active.textColor = Color.red;
ButtonToggleRedStyle.focused.textColor = Color.red;
ButtonToggleRedStyle.hover.textColor = Color.red;
ButtonToggleRedStyle.onNormal.textColor = Color.red;
ButtonToggleRedStyle.onActive.textColor = Color.red;
ButtonToggleRedStyle.onFocused.textColor = Color.red;
ButtonToggleRedStyle.onHover.textColor = Color.red;
LabelExpandStyle = new GUIStyle(HighLogic.Skin.label);
LabelExpandStyle.alignment = TextAnchor.MiddleCenter;
LabelExpandStyle.stretchWidth = true;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
namespace CacheSqlXmlService.SqlManager
{
[Serializable]
public class Condition : ICondition, ISerializable
{
private List<ICondition> _criteriaPool;
public Condition()
{
_criteriaPool = new List<ICondition>();
}
public Condition(IField left, IField rigth, string opt)
: this()
{
this.Left = left;
this.Rigth = rigth;
this.Operator = opt;
}
public IField Left
{
get;
set;
}
public IField Rigth
{
get;
set;
}
public string Operator
{
get;
set;
}
internal bool GroupAll
{
get;
set;
}
public bool IsUnitary
{
get;
set;
}
internal GroupConnectFlags GroupConnectFlag
{
get;
set;
}
public ICondition BeginAndGroup()
{
this._criteriaPool.Add(new Condition
{
ConnectFlag = ConnectFlags.AndGroup
});
return this;
}
public ICondition BeginOrGroup()
{
this._criteriaPool.Add(new Condition
{
ConnectFlag = ConnectFlags.OrGroup
});
return this;
}
public ICondition EndGroup()
{
this._criteriaPool.Add(new Condition
{
ConnectFlag = ConnectFlags.EndGroup
});
return this;
}
public ICondition GroupWithAnd(Func<ICondition, ICondition> condition)
{
this._criteriaPool.Add(new Condition
{
ConnectFlag = ConnectFlags.AndGroup
});
var that = condition(this);
return that.EndGroup();
}
public ICondition GroupWithOr(Func<ICondition, ICondition> condition)
{
this._criteriaPool.Add(new Condition
{
ConnectFlag = ConnectFlags.OrGroup
});
var that = condition(this);
return that.EndGroup();
}
/// <summary>
/// 对前面的条件进行GROUP
/// </summary>
/// <param name="all">true:将前面所有的条件进行GROUP;false:将前面最近的一组条件进行GROUP</param>
/// <returns></returns>
public ICondition Group(bool all = false)
{
this._criteriaPool.Add(new Condition()
{
ConnectFlag = ConnectFlags.Group,
GroupAll = all,
GroupConnectFlag = GroupConnectFlags.None
});
return this;
}
/// <summary>
/// 对前面的条件进行GROUP,并与之前的GROUP以AND连接
/// </summary>
/// <param name="all">true:将前面所有的条件进行GROUP;false:将前面最近的一组条件进行GROUP</param>
public ICondition GroupWithAnd(bool all = false)
{
this._criteriaPool.Add(new Condition()
{
ConnectFlag = ConnectFlags.Group,
GroupAll = all,
GroupConnectFlag = GroupConnectFlags.And
});
return this;
}
/// <summary>
/// 对前面的条件进行GROUP,并与之前的GROUP以OR连接
/// </summary>
/// <param name="all">true:将前面所有的条件进行GROUP;false:将前面最近的一组条件进行GROUP</param>
public ICondition GroupWithOr(bool all = false)
{
this._criteriaPool.Add(new Condition()
{
ConnectFlag = ConnectFlags.Group,
GroupAll = all,
GroupConnectFlag = GroupConnectFlags.Or
});
return this;
}
/// <summary>
/// 将两个条件以AND进行连接
/// </summary>
public ICondition And(ICondition condition)
{
condition.ConnectFlag = ConnectFlags.And;
this._criteriaPool.Add(condition);
return this;
}
/// <summary>
/// 将两个条件以OR进行连接
/// </summary>
/// <param name="condition"></param>
/// <returns></returns>
public ICondition Or(ICondition condition)
{
condition.ConnectFlag = ConnectFlags.Or;
this._criteriaPool.Add(condition);
return this;
}
public ConnectFlags ConnectFlag
{
get;
set;
}
private readonly static string GROUP_FLAG = "::GROUP::";
public override string ToString()
{
string result = "";
foreach (Condition condition in _criteriaPool)
{
if (condition.ConnectFlag == ConnectFlags.Group)
{
switch (condition.GroupConnectFlag)
{
case GroupConnectFlags.And:
result = InsertedGroup(result, condition.GroupAll ? "(" : " And (", condition.GroupAll ? 0 : LastGroupIndex(result), condition.GroupAll) + ")" + GROUP_FLAG;
break;
case GroupConnectFlags.Or:
result = InsertedGroup(result, condition.GroupAll ? "(" : " Or (", condition.GroupAll ? 0 : LastGroupIndex(result), condition.GroupAll) + ")" + GROUP_FLAG;
break;
case GroupConnectFlags.None:
result = " ( " + result + " ) " + GROUP_FLAG; ;
break;
default:
break;
}
}
else if (condition.ConnectFlag == ConnectFlags.And || condition.ConnectFlag == ConnectFlags.Or || condition.ConnectFlag == ConnectFlags.AndGroup || condition.ConnectFlag == ConnectFlags.OrGroup)
{
if (condition.Left == null && condition.Operator == null && condition.Rigth == null)
{
result += condition.ConnectFlag.ToSqlString() + condition;
}
else
{
var flag = (result == "" || result.Trim().Last() == '(') ? "" : condition.ConnectFlag.ToSqlString();
result += flag +
condition.Left.Seed +
condition.Operator +
(condition.IsUnitary ? "" : condition.Rigth.Seed);
}
}
else if (condition.ConnectFlag == ConnectFlags.EndGroup)
{
if (condition.Left == null && condition.Operator == null && condition.Rigth == null)
{
result += condition.ConnectFlag.ToSqlString() + condition;
}
else
{
result = result.Trim();
if (result.EndsWith("("))
{
result = result.Remove(result.Length - 1);
}
if(result.EndsWith("AND", StringComparison.OrdinalIgnoreCase))
{
result = result.Remove(result.Length - 3);
}
if (result.EndsWith("OR", StringComparison.OrdinalIgnoreCase))
{
result = result.Remove(result.Length - 2);
}
result += condition.ConnectFlag.ToSqlString() +
condition.Left.Seed +
condition.Operator +
(condition.IsUnitary ? "" : condition.Rigth.Seed);
}
}
}
result = result.Trim();
if (result.StartsWith("and", StringComparison.OrdinalIgnoreCase))
{
result = result.Substring(4);
}
else if(result.StartsWith("or", StringComparison.OrdinalIgnoreCase))
{
result = result.Substring(3);
}
var whereString = result.Replace(GROUP_FLAG, string.Empty).Replace("( ) And ", "").Replace("( ) Or ", "").Replace("( AND", "(").Replace("( OR", "(");
if (whereString.Count(c => c.Equals('(')) != whereString.Count(c => c.Equals(')')))
throw new Exception("Condition的括号不匹配,请确定对应的BeginxGroup是否有对应的EndGroup,及确定没有多余的EndGroup");
return whereString;
}
private string InsertedGroup(string refStr, string groupStr, int index, bool groupAll)
{
var result = refStr.Insert(index, groupStr);
if (!groupAll)
{
string andKey = " And ";
string orKey = " Or ";
string startStr = result.Substring(0, index + groupStr.Length);
string endStr = result.Substring(index + groupStr.Length);
if (endStr.IndexOf(andKey, StringComparison.Ordinal) == 0)
{
return startStr + result.Substring(index + groupStr.Length + andKey.Length);
}
if (endStr.IndexOf(" Or ", StringComparison.Ordinal) == 0)
{
return startStr + result.Substring(index + groupStr.Length + orKey.Length);
}
//string startStr = result.Substring(0, index + groupStr.Length);
//result = Regex.Replace(result, string.Format("({0})(\\s+?And|Or\\s+?)([\\s\\S]+)", startStr), "$1$3");
}
//var andKey = " And ";
//var orKey = " Or ";
//var fAndIndex = result.IndexOf(andKey, index + groupStr.Length);
//var fOrIndex = result.IndexOf(orKey, index + groupStr.Length);
//if (fAndIndex > 0)
//{
// result = result.Substring(0, fAndIndex) + result.Substring(fAndIndex + andKey.Length, result.Length - fAndIndex - andKey.Length);
//}
//if (fOrIndex>0)
//{
// result = result.Substring(0, fOrIndex) + result.Substring(fOrIndex + orKey.Length, result.Length - fOrIndex - orKey.Length);
//}
return result;
}
private int LastGroupIndex(string cStr)
{
var sIndex = cStr.LastIndexOf(GROUP_FLAG);
return sIndex >= 0 ? sIndex + GROUP_FLAG.Length : -1;
}
internal enum GroupConnectFlags
{
And,
Or,
None
}
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new NotImplementedException();
}
}
}
|
using Sentry.Android.Extensions;
namespace Sentry.Android.Callbacks;
internal class TracesSamplerCallback : JavaObject, JavaSdk.SentryOptions.ITracesSamplerCallback
{
private readonly Func<TransactionSamplingContext, double?> _tracesSampler;
public TracesSamplerCallback(Func<TransactionSamplingContext, double?> tracesSampler)
{
_tracesSampler = tracesSampler;
}
public JavaDouble? Sample(JavaSdk.SamplingContext c)
{
var context = c.ToTransactionSamplingContext();
return (JavaDouble?)_tracesSampler.Invoke(context);
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Audio;
using AlmenaraGames;
using UnityEngine.SceneManagement;
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace AlmenaraGames{
[HelpURL("https://almenaragames.github.io/#CSharpClass:AlmenaraGames.MultiAudioManager")]
[AddComponentMenu("")]
public class MultiAudioManager : MonoBehaviour {
public static readonly string Version = "3.3";
public AlmenaraGames.Tools.MLPASConfig config;
public enum UpdateModes
{
ScaledTime,
UnscaledTime
}
private AudioMixerGroup sfxMixerGroup;
private AudioMixerGroup bgmMixerGroup;
private LayerMask occludeCheck;
private float occludeMultiplier = 0.5f;
public AudioMixerGroup SfxMixerGroup { get { return sfxMixerGroup; } }
public AudioMixerGroup BgmMixerGroup { get { return bgmMixerGroup; } }
public LayerMask OccludeCheck { get { return occludeCheck; } }
public float OccludeMultiplier { get { return occludeMultiplier; } }
public string RuntimeIdentifierPrefix = "[rt]";
private bool prevPauseListener;
private bool paused;
/// <summary>
/// The paused state of the audio system.
///If set to true, all MultiAudioSources playing will be paused.This works in the same way as pausing the game in the editor.
///While the pause-state is true, the AudioSettings.dspTime will be frozen and further MultiAudioSource play requests will start off paused.
///If you want certain sounds to still play during the pause, you need to set the IgnoreListenerPause property on the MultiAudioSource to true for these.
///This is typically menu item sounds or background music for the menu.
/// </summary>
public static bool Paused { get { return MultiAudioManager.Instance.paused; } set { MultiAudioManager.Instance.paused = value; } }
private bool ignore;
private static MultiAudioManager instance;
private Vector3 audioListenerPosition;
public Vector3 AudioListenerPosition { get { return audioListenerPosition; } }
[Space(10f)]
public List<MultiAudioListener> listenersComponents = new List<MultiAudioListener>();
[HideInInspector]
public List<Vector3> listenersForwards = new List<Vector3>();
[HideInInspector]
public List<MultiAudioListener> oldListeners = new List<MultiAudioListener>();
[HideInInspector]
public List<Vector3> listenersPositions = new List<Vector3>();
[HideInInspector]
public List<MultiReverbZone> reverbZones = new List<MultiReverbZone>();
[HideInInspector] public int reverbZonesCount = 0;
[HideInInspector] private List<MultiAudioSource> audioSources = new List<MultiAudioSource>();
public List<MultiAudioSource> AudioSources { get { return audioSources; } set { audioSources = value; } }
private List<AudioObject> globalAudioObjects = new List<AudioObject>();
private static string runtimeIdentifierPrefix = "[rt]";
private static Dictionary<string, AudioObject> runtimeIdentifiers = new Dictionary<string, AudioObject>();
public Dictionary<string, AudioObject> RuntimeIdentifiers { get { return MultiAudioManager.runtimeIdentifiers; } }
private static int runtimeIdentifiersCount;
public static int RuntimeIdentifiersCount { get { return runtimeIdentifiersCount; } }
private int maxAudioSources = 512;
[SerializeField] static ulong sessionIndex = 0;
/// <summary>
/// DON'T CHANGE THE VALUE
/// </summary>
internal static bool noListeners = false;
[SerializeField] static Scene currentActiveScene;
/// <summary>
/// DON'T CHANGE THE VALUE
/// </summary>
internal static Dictionary<AudioObject,uint> clampedSources = new Dictionary<AudioObject, uint>();
/// <summary>
/// DON'T CHANGE THE VALUE
/// </summary>
internal static int clampedSourcesCount;
static bool instanceNULL = true;
/* public static void ResetStaticVars()
{
instanceNULL = true;
sessionIndex = 0;
noListeners = false;
currentActiveScene = default(Scene);
clampedSources = new Dictionary<AudioObject, uint>();
runtimeIdentifiersCount = 0;
runtimeIdentifiers = new Dictionary<string, AudioObject>();
runtimeIdentifierPrefix = "[rt]";
instance = null;
}*/
//Singleton check
public static MultiAudioManager Instance
{
get {
if (applicationIsQuitting || !Application.isPlaying)
return null;
if (MultiAudioManager.instanceNULL) {
GameObject _MultiAudioManager = new GameObject ("MultiAudioManager");
_MultiAudioManager.AddComponent<MultiAudioManager> ();
foreach (var item in GameObject.FindObjectsOfType (typeof(AudioListener))) {
Destroy (item as AudioListener);
}
_MultiAudioManager.AddComponent<AudioListener> ();
}
return instance;
}
}
// Use this for initialization
void Awake () {
currentActiveScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene ();
// if the singleton hasn't been initialized yet
if (instance != null && instance != this)
{
ignore = true;
Destroy(this.gameObject);
return;
}
MultiAudioManager.instanceNULL = false;
instance = this;
DontDestroyOnLoad(gameObject);
if (!ignore) {
sessionIndex = 0;
if (config == null)
{
config = Resources.Load("MLPASConfig/MLPASConfig", typeof(AlmenaraGames.Tools.MLPASConfig)) as AlmenaraGames.Tools.MLPASConfig;
}
if (config == null)
{
Debug.LogError("The MLPAS Config file has been removed, open the 'Almenara Games/MLPAS/Config' tab to create a new one");
return;
}
sfxMixerGroup = config.sfxMixerGroup;
bgmMixerGroup= config.bgmMixerGroup;
occludeCheck= config.occludeCheck;
maxAudioSources=(int)config.maxAudioSources;
occludeMultiplier = config.occludeMultiplier;
runtimeIdentifierPrefix = config.runtimeIdentifierPrefix;
MultiPoolAudioSystem.audioManager = Instance;
ClearAudioListeners ();
//Fill The Pool
for (int i = 0; i < maxAudioSources; i++) {
GameObject au = new GameObject ("PooledAudioSource_" + (i+1).ToString());
au.hideFlags = HideFlags.HideInHierarchy;
MultiAudioSource ssAus = au.AddComponent<MultiAudioSource> ();
ssAus.InsidePool = true;
MultiPoolAudioSystem.audioManager.AudioSources.Add (ssAus);
au.transform.parent = this.gameObject.transform;
au.SetActive (false);
}
LoadAllGlobalAudioObjects ();
}
}
void OnEnable()
{
SceneManager.sceneLoaded += OnSceneLoaded;
SceneManager.sceneUnloaded += OnSceneUnloaded;
SceneManager.activeSceneChanged += OnActiveSceneChanged;
noListeners = listenersForwards.Count < 1;
}
void OnDisable()
{
SceneManager.sceneLoaded -= OnSceneLoaded;
SceneManager.sceneUnloaded -= OnSceneUnloaded;
SceneManager.activeSceneChanged -= OnActiveSceneChanged;
}
void OnSceneUnloaded(Scene scene)
{
foreach (var source in audioSources) {
if (source.InsidePool && !source.PersistsBetweenScenes && source.SessionIndex <= sessionIndex) {
// source.Stop ();
}
}
sessionIndex += 1;
}
void OnActiveSceneChanged(Scene prevScene,Scene scene)
{
currentActiveScene = scene;
}
void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
foreach (var item in GameObject.FindObjectsOfType (typeof(AudioListener))) {
if ((item as AudioListener).gameObject!=this.gameObject)
Destroy (item as AudioListener);
}
}
void Update()
{
if (prevPauseListener != Paused) {
AudioListener.pause = Paused;
prevPauseListener = Paused;
}
transform.position = Vector3.zero;
audioListenerPosition = transform.position;
}
public void ReloadConfig()
{
sfxMixerGroup= config.sfxMixerGroup;
bgmMixerGroup= config.bgmMixerGroup;
occludeCheck= config.occludeCheck;
maxAudioSources=(int)config.maxAudioSources;
}
void LoadAllGlobalAudioObjects()
{
foreach (var obj in Resources.LoadAll<AudioObject>("Global Audio Objects"))
{
var asset = obj;
bool checkSameIdentifier = false;
AudioObject testObject = asset;
foreach (var item in globalAudioObjects)
{
if (!string.IsNullOrEmpty(asset.identifier) && !string.IsNullOrEmpty(item.identifier) && item.identifier == asset.identifier)
{
checkSameIdentifier = true;
testObject = item;
}
}
if (!string.IsNullOrEmpty(asset.identifier) && !checkSameIdentifier)
{
globalAudioObjects.Add(asset);
}
else
{
if (!string.IsNullOrEmpty(asset.identifier) && checkSameIdentifier)
{
Debug.LogError("<b>" + testObject.name + "</b> and " + "<b>" + asset.name + "</b> has the same identifier. Change or remove the " + "<b>" + asset.name + "</b> identifier to avoid conflicts", asset);
}
}
}
}
/// <summary>
/// Gets the <see cref="AudioObject"/> with the specific identifier.
/// </summary>
/// <param name="identifier">Identifier.</param>
/// <param name="showWarning">Shows a warning if the Audio Object can't be finded.</param>
public static AudioObject GetAudioObjectByIdentifier(string identifier, bool showWarning=true)
{
int listCount = MultiPoolAudioSystem.audioManager.globalAudioObjects.Count;
for (int i = 0; i < listCount; i++) {
if (MultiPoolAudioSystem.audioManager.globalAudioObjects[i].identifier == identifier) {
return MultiPoolAudioSystem.audioManager.globalAudioObjects[i];
}
}
if (runtimeIdentifiersCount > 0)
{
if (runtimeIdentifiers.ContainsKey(identifier))
{
if (showWarning)
{
if (Object.ReferenceEquals(runtimeIdentifiers[identifier], null))
Debug.LogWarning("Runtime Identifier: " + "<b>" + identifier + "</b>" + " doesn't have any <b>Audio Object</b> assigned");
}
return runtimeIdentifiers[identifier];
}
}
if (showWarning)
{
if (identifier.Contains(runtimeIdentifierPrefix))
{
Debug.LogWarning("Can't get an <b>Audio Object</b> with the runtime identifier: " + "<b>" + identifier + "</b>" + "\nRemember that the <b>Runtime Identifier</b> needs to be defined");
}
else
{
Debug.LogWarning("Can't get an <b>Audio Object</b> with the identifier: " + "<b>" + identifier + "</b>" + "\nRemember that the <b>Audio Object</b> needs to be in the \"Resources\\Global Audio Objects\" folder and the identifier is case sensitive.");
}
}
return null;
}
/// <summary>
/// Determines if the specific Runtime Identifier is currently defined.
/// </summary>
/// <returns><c>true</c> if the specified Runtime Identifier is currently defined; otherwise, <c>false</c>.</returns>
/// <param name="runtimeIdentifier">Runtime Identifier to define. (The prefix for the runtime time identifier will be added automatically to the name)</param>
/// <param name="checkForAssignment">Returns true only if the assigned Audio Object of the Runtime Identifier is not NULL.</param>
public static bool IsRuntimeIdentifierDefined(string runtimeIdentifier, bool checkForAssignment)
{
string id = runtimeIdentifierPrefix + runtimeIdentifier.Replace(runtimeIdentifierPrefix, "");
if (runtimeIdentifiers.ContainsKey(id))
{
if (checkForAssignment)
{
if (!Object.ReferenceEquals(runtimeIdentifiers[id], null))
return true;
else
return false;
}
else
{
return true;
}
}
return false;
}
/// <summary>
/// Defines a new Runtime Identifier
/// </summary>
/// <param name="runtimeIdentifier">Runtime Identifier to define. (The prefix for the runtime time identifier will be added automatically to the name)</param>
/// <param name="audioObject">Audio Object to assign.</param>
public static void DefineRuntimeIdentifier(string runtimeIdentifier, AudioObject audioObject=null)
{
string id = runtimeIdentifierPrefix + runtimeIdentifier.Replace(runtimeIdentifierPrefix, "");
if (runtimeIdentifiers.ContainsKey(id))
{
Debug.LogWarning("Runtime Identifier: " + "<i>'" + id.Replace(runtimeIdentifierPrefix, "") + "'</i>" + " is already defined, its <b>Audio Object</b> has been changed");
AssignRuntimeIdentifierAudioObject(runtimeIdentifier, audioObject);
}
else
{
runtimeIdentifiers.Add(id, audioObject);
}
runtimeIdentifiersCount++;
}
/// <summary>
/// Removes a specific Runtime Identifier
/// </summary>
/// <param name="runtimeIdentifier">Runtime Identifier to remove</param>
public static void RemoveRuntimeIdentifier(string runtimeIdentifier)
{
string rtId = runtimeIdentifierPrefix + runtimeIdentifier.Replace(runtimeIdentifierPrefix, "");
if (runtimeIdentifiers.ContainsKey(rtId))
{
runtimeIdentifiers.Remove(rtId);
runtimeIdentifiersCount--;
}
else
{
Debug.LogWarning("Runtime Identifier: " + "<i>'" + rtId.Replace(runtimeIdentifierPrefix, "") + "'</i>" + " is already removed");
}
}
/// <summary>
/// Removes all Runtime Identifiers
/// </summary>
public static void ClearAllRuntimeIdentifiers()
{
runtimeIdentifiers.Clear();
runtimeIdentifiersCount=0;
}
/// <summary>
/// Assign an <see cref="AudioObject"/> to the specific Runtime Identifier
/// </summary>
/// <param name="runtimeIdentifier"></param>
/// <param name="audioObject"></param>
public static void AssignRuntimeIdentifierAudioObject(string runtimeIdentifier, AudioObject audioObject)
{
string rtId = runtimeIdentifierPrefix + runtimeIdentifier.Replace(runtimeIdentifierPrefix, "");
if (runtimeIdentifiers.ContainsKey(rtId))
runtimeIdentifiers[rtId] =audioObject;
else
{
Debug.LogError("Runtime Identifier: " + "<i>'" + rtId.Replace(runtimeIdentifierPrefix, "") + "'</i>" + " has not been defined");
}
}
/// <summary>
/// ONLY FOR INTERNAL USE
/// </summary>
internal void AddAvailableListener(MultiAudioListener listener)
{
listenersForwards.Add(listener.RealListener.right);
listenersPositions.Add(listener.RealListener.position);
listenersComponents.Add(listener);
listener.Index = listenersPositions.Count - 1;
}
void ClearAudioListeners () {
listenersComponents.Clear ();
listenersForwards.Clear ();
oldListeners.Clear ();
listenersPositions.Clear ();
}
/// <summary>
/// ONLY FOR INTERNAL USE
/// </summary>
internal void RemoveAudioListener (MultiAudioListener listener) {
oldListeners = new List<MultiAudioListener>(listenersComponents);
foreach (var item in oldListeners) {
item.Index = -1;
}
listenersForwards.Clear ();
listenersPositions.Clear ();
listenersComponents.Clear ();
foreach (var item in oldListeners) {
if (item!=listener)
AddAvailableListener (item);
}
noListeners = listenersForwards.Count < 1;
}
/// <summary>
/// ONLY FOR INTERNAL USE
/// </summary>
internal static bool ClampedAudioCanBePlayed(AudioObject audioObject)
{
if (audioObject.maxSources < 1) {
return true;
}
if (!clampedSources.ContainsKey (audioObject) || clampedSources.ContainsKey (audioObject) && clampedSources [audioObject] < audioObject.maxSources) {
return true;
}
return false;
}
static void RealPlayAudioObject(MultiAudioSource _audioSource, AudioObject audioObject, int channel = -1, bool changePosition = false, Vector3 position = default(Vector3), Transform targetToFollow = null, AudioMixerGroup mixerGroup = null, bool occludeSound = false, float delay = 0f, float fadeInTime = 0f, bool setMixer=false)
{
if (changePosition)
{
_audioSource.transform.position = position;
}
_audioSource.AudioObject = audioObject;
_audioSource.gameObject.SetActive(true);
currentActiveScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene();
_audioSource.scene = currentActiveScene;
if (fadeInTime > 0)
{
_audioSource.PlayFadeIn(fadeInTime, channel, targetToFollow, delay);
}
else
{
_audioSource.Play(channel, targetToFollow, delay);
}
if (occludeSound)
_audioSource.OccludeSound = occludeSound;
if (setMixer)
_audioSource.MixerGroupOverride = mixerGroup;
}
static void RealPlayAudioObjectOverride(MultiAudioSource _audioSource, AudioClip audioClipOverride, AudioObject audioObject, int channel = -1, bool changePosition = false, Vector3 position = default(Vector3), Transform targetToFollow = null, AudioMixerGroup mixerGroup = null, bool occludeSound = false, float delay = 0f, float fadeInTime = 0f, bool setMixer = false)
{
if (changePosition)
{
_audioSource.transform.position = position;
}
currentActiveScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene();
_audioSource.scene = currentActiveScene;
_audioSource.AudioObject = audioObject;
_audioSource.gameObject.SetActive(true);
if (fadeInTime > 0)
{
_audioSource.PlayFadeInOverride(fadeInTime, audioClipOverride, channel, targetToFollow, delay);
}
else
{
_audioSource.PlayOverride(audioClipOverride, channel, targetToFollow, delay);
}
if (occludeSound)
_audioSource.OccludeSound = occludeSound;
if (setMixer)
_audioSource.MixerGroupOverride = mixerGroup;
}
static void RealPlayAudioObject(GameObject caller, MultiAudioSource _audioSource, AudioObject audioObject, int channel = -1, bool changePosition = false, Vector3 position = default(Vector3), Transform targetToFollow = null, AudioMixerGroup mixerGroup = null, bool occludeSound = false, float delay = 0f, float fadeInTime = 0f, bool setMixer = false)
{
if (changePosition)
{
_audioSource.transform.position = position;
}
_audioSource.AudioObject = audioObject;
_audioSource.gameObject.SetActive(true);
_audioSource.scene = caller.scene;
if (fadeInTime > 0)
{
_audioSource.PlayFadeIn(fadeInTime, channel, targetToFollow, delay);
}
else
{
_audioSource.Play(channel, targetToFollow, delay);
}
if (occludeSound)
_audioSource.OccludeSound = occludeSound;
if (setMixer)
_audioSource.MixerGroupOverride = mixerGroup;
}
static void RealPlayAudioObjectOverride(GameObject caller, MultiAudioSource _audioSource, AudioClip audioClipOverride, AudioObject audioObject, int channel = -1, bool changePosition = false, Vector3 position = default(Vector3), Transform targetToFollow = null, AudioMixerGroup mixerGroup = null, bool occludeSound = false, float delay = 0f, float fadeInTime = 0f, bool setMixer = false)
{
if (changePosition)
{
_audioSource.transform.position = position;
}
_audioSource.AudioObject = audioObject;
_audioSource.gameObject.SetActive(true);
_audioSource.scene = caller.scene;
if (fadeInTime > 0)
{
_audioSource.PlayFadeInOverride(fadeInTime, audioClipOverride, channel, targetToFollow, delay);
}
else
{
_audioSource.PlayOverride(audioClipOverride, channel, targetToFollow, delay);
}
if (occludeSound)
_audioSource.OccludeSound = occludeSound;
if (setMixer)
_audioSource.MixerGroupOverride = mixerGroup;
}
#region Play Methods
#region PlayAudioObject Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Transform targetToFollow)
{
if (audioObject != null)
{
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObject(AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObject Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayAudioObjectOverride Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObjectOverride Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false, delay,0f,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayAudioObjectByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObjectByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayAudioObjectOverrideByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, 0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,0,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,0,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObjectOverrideByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay,0, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource PlayDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay,0,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObject Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime,true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObject(AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObject Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObject(AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObjectOverride Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObjectOverride Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverride(AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObjectByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectByIdentifier(string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObjectByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectByIdentifier(string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObjectOverrideByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,0, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObjectOverrideByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource FadeInDelayedAudioObjectOverrideByIdentifier(AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay, fadeInTime, true);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#endregion
#region Scene Play Methods
#region PlayAudioObject Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObject Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayAudioObjectOverride Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObjectOverride Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayAudioObjectByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObjectByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject (sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayAudioObjectOverrideByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region PlayDelayedAudioObjectOverrideByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with another Audio Clip using a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
public static MultiAudioSource ScenePlayDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObject Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObject(GameObject sceneCaller,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObject Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, -1, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObject(GameObject sceneCaller,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, audioObject, channel, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObjectOverride Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObjectOverride Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, -1, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObject"><see cref="AudioObject"/>.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverride(GameObject sceneCaller,AudioClip audioClipOverride,AudioObject audioObject,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (audioObject != null) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,audioObject, channel, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObjectByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in at the specified Position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObjectByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in and a delay specified in seconds using a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectByIdentifier(GameObject sceneCaller,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObject(sceneCaller,_audioSource, MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInAudioObjectOverrideByIdentifier Method
// Normal with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Normal with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,0,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#region FadeInDelayedAudioObjectOverrideByIdentifier Method
// Delayed with channel-position/transform
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, null, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, false,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
// Delayed with channel-position/transform-mixerGroup-occludeSound
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified Channel and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds and makes that its pooled <see cref="MultiAudioSource"/> follow a target.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="targetToFollow">Target to follow.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Transform targetToFollow,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, false, Vector3.zero, targetToFollow, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio();
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), -1, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
/// <summary>
/// Plays an Occludable <see cref="AudioObject"/> by its identifier with a fade in using another Audio Clip and a different AudioMixerGroup with a delay specified in seconds at the specified position in the specified Channel.
/// </summary>
/// <returns>The pooled <see cref="MultiAudioSource"/>.</returns>
/// <param name="sceneCaller">GameObject used to link the pooled <see cref="MultiAudioSource"/> to the correct scene. (Useful to avoid audios not stopping when unloading an Additive Scene)</param>
/// <param name="audioClipOverride">Audio clip override.</param>
/// <param name="audioObjectIdentifier">Identifier.</param>
/// <param name="delay">Delay.</param>
/// <param name="channel">Channel.</param>
/// <param name="position">Position.</param>
/// <param name="mixerGroup">Mixer group.</param>
/// <param name="occludeSound">If set to <c>true</c> occlude sound.</param>
/// <param name="fadeInTime">Fade In Time.</param>
public static MultiAudioSource SceneFadeInDelayedAudioObjectOverrideByIdentifier(GameObject sceneCaller,AudioClip audioClipOverride,string audioObjectIdentifier,float delay,int channel,Vector3 position,AudioMixerGroup mixerGroup,bool occludeSound,float fadeInTime=1f)
{
if (!string.IsNullOrEmpty(audioObjectIdentifier)) {
MultiAudioSource _audioSource = GetPooledAudio(channel);
RealPlayAudioObjectOverride (sceneCaller,_audioSource, audioClipOverride,MultiAudioManager.GetAudioObjectByIdentifier(audioObjectIdentifier), channel, true, position, null, mixerGroup, occludeSound,delay,fadeInTime);
return _audioSource;
}
else { Debug.LogWarning("<i>Audio Object</i> to play is missing or invalid"); } return null;
}
// // // // //
#endregion
#endregion
/// <summary>
/// Stops the <see cref="MultiAudioSource"/> playing at the specified channel.
/// </summary>
/// <param name="_channel">Channel.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void StopAudioSource(int _channel,bool disableObject=false)
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].Channel==_channel) {
MultiPoolAudioSystem.audioManager.AudioSources [i].Stop(MultiPoolAudioSystem.audioManager.AudioSources [i].InsidePool?true:disableObject);
}
}
}
/// <summary>
/// Stops the specified <see cref="MultiAudioSource"/>.
/// </summary>
/// <param name="audioSource">Multi Audio source.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void StopAudioSource(MultiAudioSource audioSource,bool disableObject=false)
{
audioSource.Stop (audioSource.InsidePool?true:disableObject);
}
/// <summary>
/// Stops the specified<see cref="MultiAudioSource"/> playing at the specified channel with a delay specified in seconds.
/// </summary>
/// <param name="_channel">Channel.</param>
/// <param name="_delay">Delay time for Stop.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void StopAudioSource(int _channel,float _delay,bool disableObject=false)
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].Channel==_channel) {
MultiPoolAudioSystem.audioManager.AudioSources [i].StopDelayed(_delay,MultiPoolAudioSystem.audioManager.AudioSources [i].InsidePool?true:disableObject);
}
}
}
/// <summary>
/// Stops the specified<see cref="MultiAudioSource"/> with a delay specified in seconds.
/// </summary>
/// <param name="audioSource">Multi Audio source.</param>
/// <param name="_delay">Delay time for Stop.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void StopAudioSource(MultiAudioSource audioSource,float _delay,bool disableObject=false)
{
audioSource.StopDelayed(_delay,audioSource.InsidePool?true:disableObject);
}
/// <summary>
/// Stops the specified<see cref="MultiAudioSource"/> playing at the specified channel with a delay specified in seconds using a fade out.
/// </summary>
/// <param name="_channel">Channel.</param>
/// <param name="_delay">Delay time for Stop.</param>
/// <param name="_fadeOutTime">Fade out time.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void FadeOutAudioSource(int _channel,float _delay,float _fadeOutTime,bool disableObject=false)
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].Channel==_channel) {
MultiPoolAudioSystem.audioManager.AudioSources [i].FadeOutDelayed(_delay,_fadeOutTime,MultiPoolAudioSystem.audioManager.AudioSources [i].InsidePool?true:disableObject);
}
}
}
/// <summary>
/// Stops the specified<see cref="MultiAudioSource"/> with a delay specified in seconds using a fade out.
/// </summary>
/// <param name="audioSource">Multi Audio source.</param>
/// <param name="_delay">Delay time for Stop.</param>
/// <param name="_fadeOutTime">Fade out time.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void FadeOutAudioSource(MultiAudioSource audioSource,float _delay,float _fadeOutTime,bool disableObject=false)
{
audioSource.FadeOutDelayed(_delay,_fadeOutTime,audioSource.InsidePool?true:disableObject);
}
/// <summary>
/// Pauses/Unpauses the <see cref="MultiAudioSource"/> playing at the specified channel.
/// </summary>
/// <param name="_channel">Channel.</param>
/// <param name="pause">If set to <c>true</c> pauses the source.</param>
public static void PauseAudioSource(int _channel,bool pause=true)
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].Channel==_channel) {
MultiPoolAudioSystem.audioManager.AudioSources [i].LocalPause=pause;
}
}
}
/// <summary>
/// Pauses/Unpauses the specified <see cref="MultiAudioSource"/>.
/// </summary>
/// <param name="audioSource">Multi Audio source.</param>
/// <param name="pause">If set to <c>true</c> pauses the source.</param>
public static void PauseAudioSource(MultiAudioSource audioSource,bool pause=true)
{
audioSource.LocalPause=pause;
}
/// <summary>
/// Stops the <see cref="MultiAudioSource"/> playing at the specified channel with a fade out.
/// </summary>
/// <param name="_channel">Channel.</param>
/// <param name="fadeOutTime">Fade out time.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void FadeOutAudioSource(int _channel,float fadeOutTime=1f,bool disableObject=false)
{
bool finded = false;
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (!finded && MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].Channel==_channel) {
MultiPoolAudioSystem.audioManager.AudioSources [i].FadeOut(fadeOutTime,MultiPoolAudioSystem.audioManager.AudioSources [i].InsidePool?true:disableObject);
finded=true;
}
}
}
/// <summary>
/// Stops the specified <see cref="MultiAudioSource"/> with a fade out.
/// </summary>
/// <param name="audioSource">Multi Audio source.</param>
/// <param name="fadeOutTime">Fade out time.</param>
/// <param name="disableObject">If set to <c>true</c> disable object.</param>
public static void FadeOutAudioSource(MultiAudioSource audioSource,float fadeOutTime=1f,bool disableObject=false)
{
audioSource.FadeOut(fadeOutTime,audioSource.InsidePool?true:disableObject);
}
/// <summary>
/// Stops all playing Multi Audio Sources.
/// </summary>
public static void StopAllAudioSources()
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled) {
MultiPoolAudioSystem.audioManager.AudioSources [i].Stop();
}
}
}
/// <summary>
/// Stops all Multi Audio Sources marked as BGM audios.
/// </summary>
public static void StopAllBGMAudios()
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].AudioObject.isBGM) {
MultiPoolAudioSystem.audioManager.AudioSources [i].Stop();
}
}
}
/// <summary>
/// Pauses/Unpauses all Multi Audio Sources not marked as BGM audios.
/// <param name="pause">If set to <c>true</c> pauses the source.</param>
/// </summary>
public static void PauseAllNonBGMAudios(bool pause=true)
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && !MultiPoolAudioSystem.audioManager.AudioSources[i].AudioObject.isBGM) {
MultiPoolAudioSystem.audioManager.AudioSources [i].LocalPause=pause;
}
}
}
/// <summary>
/// Pauses/Unpauses all Multi Audio Sources marked as BGM audios.
/// <param name="pause">If set to <c>true</c> pauses the source.</param>
/// </summary>
public static void PauseAllBGMAudios(bool pause=true)
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].AudioObject.isBGM) {
MultiPoolAudioSystem.audioManager.AudioSources [i].LocalPause=pause;
}
}
}
/// <summary>
/// Stops all Multi Audio Sources not marked as BGM audios.
/// </summary>
public static void StopAllNonBGMAudios()
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && !MultiPoolAudioSystem.audioManager.AudioSources[i].AudioObject.isBGM) {
MultiPoolAudioSystem.audioManager.AudioSources [i].Stop();
}
}
}
/// <summary>
/// Stops all looped Multi Audio Sources.
/// </summary>
public static void StopAllLoopedAudioSources()
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].Loop) {
MultiPoolAudioSystem.audioManager.AudioSources [i].Stop();
}
}
}
/// <summary>
/// Stops all persistent Multi Audio Sources.
/// </summary>
public static void StopAllPersistentAudioSources()
{
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources[i].isActiveAndEnabled && MultiPoolAudioSystem.audioManager.AudioSources[i].PersistsBetweenScenes) {
MultiPoolAudioSystem.audioManager.AudioSources [i].Stop();
}
}
}
private static MultiAudioSource GetPooledAudio(int _channel=-1)
{
if (MultiAudioManager.Instance.maxAudioSources == 0)
Debug.LogError ("maxAudioSources can't be 0",MultiAudioManager.Instance.gameObject);
bool finded = false;
MultiAudioSource toReturn = MultiPoolAudioSystem.audioManager.AudioSources [0];
int audioSourceListCount = MultiPoolAudioSystem.audioManager.AudioSources.Count;
for (int i = 0; i < audioSourceListCount; i++) {
MultiAudioSource source = MultiPoolAudioSystem.audioManager.AudioSources [i];
bool sourceActive = source.isActiveAndEnabled;
bool sourcePool = source.InsidePool;
bool sourcePaused = source.LocalPause;
if (!finded && sourcePool && !sourceActive && !sourcePaused || sourcePool && sourceActive && source.Channel == _channel && _channel < -1 && !sourcePaused) {
toReturn = source;
finded = true;
}
}
if (finded) {
toReturn.SessionIndex = sessionIndex;
return toReturn;
} else {
Debug.LogWarning ("Not enought pooled audio sources, returning the first pooled audio source. Consider increasing the MaxAudioSources value in the MLPASConfig.", MultiAudioManager.instance.gameObject);
toReturn.SessionIndex = sessionIndex;
return toReturn;
}
}
/// <summary>
/// Gets the <see cref="MultiAudioSource"/> played at the specified Channel (returns NULL if there is no <see cref="MultiAudioSource"/> playing at the specified Channel).
/// </summary>
/// <returns>The <see cref="MultiAudioSource"/> played at the specified Channel.</returns>
/// <param name="_channel">Channel.</param>
/// <param name="audibleOnly">Check only for audible <see cref="MultiAudioSource"/>.</param>
public static MultiAudioSource GetAudioSourceAtChannel(int _channel, bool audibleOnly=false)
{
if (_channel > -1) {
if (MultiAudioManager.Instance.maxAudioSources == 0)
Debug.LogError ("maxAudioSources can't be 0",MultiAudioManager.Instance.gameObject);
MultiAudioSource toReturn = null;
int sourcesCount = MultiPoolAudioSystem.audioManager.AudioSources.Count;
for (int i = 0; i < sourcesCount; i++) {
MultiAudioSource source = MultiPoolAudioSystem.audioManager.AudioSources [i];
bool audible = audibleOnly && !source.outOfRange || !audibleOnly;
if (source.isActiveAndEnabled && source.Channel == _channel && source.IsPlaying && audible) {
toReturn = source;
}
}
return toReturn;
} else {
Debug.LogWarning ("<b>GetAudioSourceAtChannel</b><i>(int _channel)</i> has an invalid channel index, returning NULL");
return null;
}
}
/// <summary>
/// Determines if a <see cref="MultiAudioSource"/> is playing the specified Audio Object.
/// </summary>
/// <returns><c>true</c> if a <see cref="MultiAudioSource"/> is playing the specified Audio Object; otherwise, <c>false</c>.</returns>
/// <param name="identifier">Identifier.</param>
/// <param name="audiblesOnly">Check only for audibles <see cref="MultiAudioSource"/>.</param>
public static bool IsAudioObjectPlaying(string identifier, bool audiblesOnly=false)
{
if (!string.IsNullOrEmpty(identifier)) {
if (MultiAudioManager.Instance.maxAudioSources == 0)
Debug.LogError ("maxAudioSources can't be 0",MultiAudioManager.Instance.gameObject);
int sourcesCount = MultiPoolAudioSystem.audioManager.AudioSources.Count;
for (int i = 0; i < sourcesCount; i++) {
MultiAudioSource source = MultiPoolAudioSystem.audioManager.AudioSources [i];
bool audible = audiblesOnly && !source.outOfRange || !audiblesOnly;
if (source.isActiveAndEnabled && source.AudioObject.identifier == identifier && source.IsPlaying && audible) {
return true;
}
}
} else {
Debug.LogWarning ("<b>IsAudioObjectPlaying</b><i>(int _channel)</i> has an invalid identifier");
return false;
}
return false;
}
/// <summary>
/// Gets The blend amount of the nearest listener for a specific <see cref="AudioObject"/> in a certain location.
/// </summary>
/// <param name="audioObject">Audio Object.</param>
/// <param name="testPosition">Position to Test</param>
/// <param name="minDistance">Different Min Distance (-1 default Audio Object value)</param>
/// <param name="maxDistance">Different Max Distance (-1 default Audio Object value)</param>
/// <returns></returns>
public static float GetNearestListenerBlendAt(AudioObject audioObject, Vector3 testPosition, float minDistance=-1f, float maxDistance=-1f)
{
int maxIndex = MultiPoolAudioSystem.audioManager.listenersForwards.Count;
float closestDistanceSqr = Mathf.Infinity;
Vector3 thisPosition = testPosition;
Vector3 closestPosition = thisPosition;
bool nearestListenerNULL = true;
for (int i = 0; i < maxIndex; i++) {
Vector3 tempPosition = MultiPoolAudioSystem.audioManager.listenersPositions [i];
Vector3 directionToTarget = new Vector3 (tempPosition.x - thisPosition.x, tempPosition.y - thisPosition.y, tempPosition.z - thisPosition.z);
float dSqrToTarget = directionToTarget.sqrMagnitude;
if (dSqrToTarget < closestDistanceSqr) {
closestPosition = tempPosition;
nearestListenerNULL = false;
closestDistanceSqr = dSqrToTarget;
}
}
if (nearestListenerNULL) {
return 0;
}
else {
Vector3 directionToNearestListener = new Vector3 (closestPosition.x - thisPosition.x, closestPosition.y - thisPosition.y, closestPosition.z - thisPosition.z);
float distance = directionToNearestListener.magnitude;
float nearestListenerDistance = distance;
float minDist = minDistance > -1f ? minDistance: audioObject.minDistance;
float maxDist = Mathf.Clamp( maxDistance > -1f ? maxDistance: audioObject.maxDistance, minDist, float.MaxValue );
float nearestListenerBlend = Mathf.Clamp01 (1 - (nearestListenerDistance - minDist) / (maxDist - minDist));
if (audioObject.spatialMode2D)
nearestListenerBlend = 1;
return nearestListenerBlend;
}
}
/// <summary>
/// Gets The blend amount of the nearest listener for a specific <see cref="MultiAudioSource"/> in a certain location.
/// </summary>
/// <param name="audioSource">MultiAudioSource.</param>
/// <param name="testPosition">Position to Test</param>
/// <returns></returns>
public static float GetNearestListenerBlendAt(MultiAudioSource audioSource, Vector3 testPosition)
{
int maxIndex = MultiPoolAudioSystem.audioManager.listenersForwards.Count;
float closestDistanceSqr = Mathf.Infinity;
Vector3 thisPosition = testPosition;
Vector3 closestPosition = thisPosition;
bool nearestListenerNULL = true;
bool aoNull = Object.ReferenceEquals(audioSource.AudioObject, null);
if (aoNull) {
Debug.LogWarning("<b>GetNearestListenerBlendAt</b><i>"+ audioSource.name + "</i> doesn't have an Audio Object");
return 0;
}
for (int i = 0; i < maxIndex; i++)
{
Vector3 tempPosition = MultiPoolAudioSystem.audioManager.listenersPositions[i];
Vector3 directionToTarget = new Vector3(tempPosition.x - thisPosition.x, tempPosition.y - thisPosition.y, tempPosition.z - thisPosition.z);
float dSqrToTarget = directionToTarget.sqrMagnitude;
if (dSqrToTarget < closestDistanceSqr)
{
closestPosition = tempPosition;
nearestListenerNULL = false;
closestDistanceSqr = dSqrToTarget;
}
}
if (nearestListenerNULL)
{
return 0;
}
else
{
Vector3 directionToNearestListener = new Vector3(closestPosition.x - thisPosition.x, closestPosition.y - thisPosition.y, closestPosition.z - thisPosition.z);
float distance = directionToNearestListener.magnitude;
float nearestListenerDistance = distance;
float minDistance = audioSource.OverrideValues && audioSource.OverrideDistance ? audioSource.MinDistance : audioSource.AudioObject.minDistance;
float maxDistance = audioSource.OverrideValues && audioSource.OverrideDistance ? audioSource.MaxDistance : audioSource.AudioObject.maxDistance;
float nearestListenerBlend = Mathf.Clamp01(1 - (nearestListenerDistance - minDistance) / (maxDistance - minDistance));
if (audioSource.AudioObject.spatialMode2D)
nearestListenerBlend = 1;
return nearestListenerBlend;
}
}
/// <summary>
/// Determines if a <see cref="MultiAudioSource"/> is playing the specified Audio Object.
/// </summary>
/// <returns><c>true</c> if a <see cref="MultiAudioSource"/> is playing the specified Audio Object; otherwise, <c>false</c>.</returns>
/// <param name="audioObject">Audio Object.</param>
/// <param name="audiblesOnly">Check only for audibles <see cref="MultiAudioSource"/>.</param>
public static bool IsAudioObjectPlaying(AudioObject audioObject, bool audiblesOnly=false)
{
if (audioObject!=null) {
if (MultiAudioManager.Instance.maxAudioSources == 0)
Debug.LogError ("maxAudioSources can't be 0",MultiAudioManager.Instance.gameObject);
int sourcesCount = MultiPoolAudioSystem.audioManager.AudioSources.Count;
for (int i = 0; i < sourcesCount; i++) {
MultiAudioSource source = MultiPoolAudioSystem.audioManager.AudioSources [i];
bool audible = audiblesOnly && !source.outOfRange || !audiblesOnly;
if (source.isActiveAndEnabled && source.AudioObject == audioObject && source.IsPlaying && audible) {
return true;
}
}
} else {
Debug.LogWarning ("<b>IsAudioObjectPlaying</b><i>(int _channel)</i> has an invalid Audio Object");
return false;
}
return false;
}
/// <summary>
/// Determines if a <see cref="MultiAudioSource"/> is playing the specified Audio Object at the specific channel.
/// </summary>
/// <returns><c>true</c> if a <see cref="MultiAudioSource"/> is playing the specified Audio Object at the specific channel; otherwise, <c>false</c>.</returns>
/// <param name="identifier">Identifier.</param>
/// <param name="channel">Channel.</param>
/// <param name="audiblesOnly">Check only for audibles <see cref="MultiAudioSource"/>.</param>
public static bool IsAudioObjectPlaying(string identifier, int channel, bool audiblesOnly=false)
{
if (!string.IsNullOrEmpty(identifier)) {
if (MultiAudioManager.Instance.maxAudioSources == 0)
Debug.LogError ("maxAudioSources can't be 0",MultiAudioManager.Instance.gameObject);
int sourcesCount = MultiPoolAudioSystem.audioManager.AudioSources.Count;
for (int i = 0; i < sourcesCount; i++) {
MultiAudioSource source = MultiPoolAudioSystem.audioManager.AudioSources [i];
bool audible = audiblesOnly && !source.outOfRange || !audiblesOnly;
if (source.isActiveAndEnabled && source.AudioObject.identifier == identifier && source.IsPlaying && source.Channel==channel && audible) {
return true;
}
}
} else {
Debug.LogWarning ("<b>IsAudioObjectPlaying</b><i>(int _channel)</i> has an invalid identifier");
return false;
}
return false;
}
/// <summary>
/// Determines if a <see cref="MultiAudioSource"/> is playing the specified Audio Object at the specific channel.
/// </summary>
/// <returns><c>true</c> if a <see cref="MultiAudioSource"/> is playing the specified Audio Object at the specific channel; otherwise, <c>false</c>.</returns>
/// <param name="audioObject">Audio Object.</param>
/// <param name="channel">Channel.</param>
/// <param name="audiblesOnly">Check only for audibles <see cref="MultiAudioSource"/>.</param>
public static bool IsAudioObjectPlaying(AudioObject audioObject, int channel, bool audiblesOnly=false)
{
if (audioObject!=null) {
if (MultiAudioManager.Instance.maxAudioSources == 0)
Debug.LogError ("maxAudioSources can't be 0",MultiAudioManager.Instance.gameObject);
int sourcesCount = MultiPoolAudioSystem.audioManager.AudioSources.Count;
for (int i = 0; i < sourcesCount; i++) {
MultiAudioSource source = MultiPoolAudioSystem.audioManager.AudioSources [i];
bool audible = audiblesOnly && !source.outOfRange || !audiblesOnly;
if (source.isActiveAndEnabled && source.AudioObject == audioObject && source.IsPlaying && source.Channel==channel && audible) {
return true;
}
}
} else {
Debug.LogWarning ("<b>IsAudioObjectPlaying</b><i>(int _channel)</i> has an invalid Audio Object");
return false;
}
return false;
}
/// <summary>
/// Gets the pooled audio sources at the specified scene. (Only returns previously linked Multi Audio Sources)
/// </summary>
/// <returns>The pooled audio sources at scene.</returns>
/// <param name="scene">Scene.</param>
public static MultiAudioSource[] GetPooledAudioSourcesAtScene(UnityEngine.SceneManagement.Scene scene)
{
return MultiPoolAudioSystem.audioManager.AudioSources.FindAll (x => x.scene == scene).ToArray();
}
/// <summary>
/// Gets the pooled audio sources at the same scene of the specified game object. (Only returns previously linked Multi Audio Sources)
/// </summary>
/// <returns>The pooled audio sources at scene.</returns>
/// <param name="gameObject">Game object.</param>
public static MultiAudioSource[] GetPooledAudioSourcesAtScene(GameObject go)
{
return MultiPoolAudioSystem.audioManager.AudioSources.FindAll (x => x.scene == go.scene).ToArray();
}
private static bool applicationIsQuitting = false;
public void OnDestroy () {
MultiPoolAudioSystem.isNULL = true;
MultiAudioManager.instanceNULL = true;
applicationIsQuitting = true;
}
#if UNITY_EDITOR
void OnDrawGizmos()
{
if (Application.isPlaying && MultiAudioManager.instance.AudioSources!=null) {
for (int i = 0; i < MultiPoolAudioSystem.audioManager.AudioSources.Count; i++) {
if (MultiPoolAudioSystem.audioManager.AudioSources [i].InsidePool && MultiPoolAudioSystem.audioManager.AudioSources [i].isActiveAndEnabled) {
Gizmos.color = Color.blue;
Gizmos.DrawIcon (MultiPoolAudioSystem.audioManager.AudioSources [i].transform.position, "AlmenaraGames/MLPAS/AudioObjectIco");
//DrawAudioObjectName(MultiPoolAudioSystem.audioManager.AudioSources [i].AudioObject.name + (MultiPoolAudioSystem.audioManager.AudioSources [i].clamped?"(CLAMPED)":(MultiPoolAudioSystem.audioManager.AudioSources [i].Mute?"(MUTED)":"")),MultiPoolAudioSystem.audioManager.AudioSources [i].transform.position-Vector3.up*0.35f);
MultiPoolAudioSystem.audioManager.AudioSources [i].DrawGizmos ();
}
}
}
}
static void DrawAudioObjectName(string text, Vector3 worldPos, Color? colour = null) {
if (SceneView.lastActiveSceneView!=null && SceneView.lastActiveSceneView.camera!=null && Vector3.Distance(worldPos,SceneView.lastActiveSceneView.camera.transform.position)<15f && UnityEditor.SceneView.currentDrawingSceneView!=null && UnityEditor.SceneView.currentDrawingSceneView.camera!=null)
{
UnityEditor.Handles.BeginGUI ();
var restoreColor = GUI.color;
if (colour.HasValue)
GUI.color = colour.Value;
var view = UnityEditor.SceneView.currentDrawingSceneView;
Vector3 screenPos = view.camera.WorldToScreenPoint (worldPos);
if (screenPos.y < 0 || screenPos.y > Screen.height || screenPos.x < 0 || screenPos.x > Screen.width || screenPos.z < 0) {
GUI.color = restoreColor;
UnityEditor.Handles.EndGUI ();
return;
}
Vector2 size = GUI.skin.label.CalcSize (new GUIContent (text));
GUI.Label (new Rect (screenPos.x - (size.x / 2), -screenPos.y + view.position.height + 2, size.x, size.y), text);
GUI.color = restoreColor;
UnityEditor.Handles.EndGUI ();
}
}
#endif
void OnDrawGizmosSelected()
{
Gizmos.DrawIcon (transform.position, "AlmenaraGames/MLPAS/AudioManagerIco");
}
#if UNITY_EDITOR
[CustomEditor(typeof(MultiAudioManager))]
public class MultiAudioManagerEditor : Editor
{
private Texture logoTex;
private int specifiedChannel=-1;
[MenuItem("GameObject/Almenara Games/MLPAS/Multi Audio Source",false,+4)]
static void CreateMultiAudioSource()
{
GameObject multiAudioSourceGo = new GameObject("Multi Audio Source",typeof(MultiAudioSource));
if (SceneView.lastActiveSceneView!=null && SceneView.lastActiveSceneView.camera) {
multiAudioSourceGo.transform.position= SceneView.lastActiveSceneView.camera.transform.position + (SceneView.lastActiveSceneView.camera.transform.forward * 10f);
}
if (Selection.activeTransform != null) {
multiAudioSourceGo.transform.parent = Selection.activeTransform;
multiAudioSourceGo.transform.localPosition = Vector3.zero;
}
Selection.activeGameObject = multiAudioSourceGo;
if (multiAudioSourceGo.name == "Multi Audio Source" && GameObject.Find ("Multi Audio Source")!=null && GameObject.Find ("Multi Audio Source")!=multiAudioSourceGo) {
for (int i = 1; i < 999; i++) {
if (GameObject.Find ("Multi Audio Source (" + i.ToString () + ")") == null) {
multiAudioSourceGo.name = "Multi Audio Source (" + i.ToString () + ")";
break;
}
}
}
}
[MenuItem("GameObject/Almenara Games/MLPAS/Multi Audio Listener",false,+4)]
static void CreateMultiAudioListener()
{
GameObject multiAudioListenerGo = new GameObject("Multi Audio Listener",typeof(MultiAudioListener));
if (SceneView.lastActiveSceneView!=null && SceneView.lastActiveSceneView.camera) {
multiAudioListenerGo.transform.position= SceneView.lastActiveSceneView.camera.transform.position + (SceneView.lastActiveSceneView.camera.transform.forward * 10f);
}
if (Selection.activeTransform != null) {
multiAudioListenerGo.transform.parent = Selection.activeTransform;
multiAudioListenerGo.transform.localPosition = Vector3.zero;
}
Selection.activeGameObject = multiAudioListenerGo;
if (multiAudioListenerGo.name == "Multi Audio Listener" && GameObject.Find ("Multi Audio Listener")!=null && GameObject.Find ("Multi Audio Listener")!=multiAudioListenerGo) {
for (int i = 1; i < 999; i++) {
if (GameObject.Find ("Multi Audio Listener (" + i.ToString () + ")") == null) {
multiAudioListenerGo.name = "Multi Audio Listener (" + i.ToString () + ")";
break;
}
}
}
}
[MenuItem("GameObject/Almenara Games/MLPAS/Multi Reverb Zone",false,+4)]
static void CreateReverbZone()
{
GameObject reverZoneGo = new GameObject("Multi Reverb Zone",typeof(MultiReverbZone));
if (SceneView.lastActiveSceneView!=null && SceneView.lastActiveSceneView.camera) {
reverZoneGo.transform.position= SceneView.lastActiveSceneView.camera.transform.position + (SceneView.lastActiveSceneView.camera.transform.forward * 10f);
}
if (Selection.activeTransform != null) {
reverZoneGo.transform.parent = Selection.activeTransform;
reverZoneGo.transform.localPosition = Vector3.zero;
}
Selection.activeGameObject = reverZoneGo;
if (reverZoneGo.name == "Multi Reverb Zone" && GameObject.Find ("Multi Reverb Zone")!=null && GameObject.Find ("Multi Reverb Zone")!=reverZoneGo) {
for (int i = 1; i < 999; i++) {
if (GameObject.Find ("Multi Reverb Zone (" + i.ToString () + ")") == null) {
reverZoneGo.name = "Multi Reverb Zone (" + i.ToString () + ")";
break;
}
}
}
}
void OnEnable()
{
logoTex = Resources.Load ("MLPASImages/logoSmall") as Texture;
}
public override void OnInspectorGUI()
{
if (target.name == "MultiAudioManager") {
GUILayout.Space (10f);
var centeredStyle = new GUIStyle (GUI.skin.GetStyle ("Label"));
centeredStyle.alignment = TextAnchor.UpperCenter;
GUILayout.Label (logoTex, centeredStyle);
GUILayout.Space (10f);
if (GUILayout.Button ("Stop All Audio Sources")) {
MultiAudioManager.StopAllAudioSources ();
}
if (GUILayout.Button ("Stop All Looped Sources")) {
MultiAudioManager.StopAllLoopedAudioSources ();
}
GUILayout.Space (10f);
specifiedChannel = EditorGUILayout.IntField (specifiedChannel);
if (GUILayout.Button (specifiedChannel > -1 ? "Stop Audio Source at Channel " + specifiedChannel.ToString () : "Stop Audio Sources with no Channel")) {
MultiAudioManager.StopAudioSource (specifiedChannel);
}
MultiAudioManager.Paused=EditorGUILayout.Toggle ("Pause Listeners", MultiAudioManager.Paused);
GUILayout.Space (5f);
GUIStyle versionStyle = new GUIStyle (EditorStyles.miniLabel);
versionStyle.alignment = TextAnchor.MiddleRight;
EditorGUILayout.LabelField (MultiAudioManager.Version, versionStyle);
}
else {
GUILayout.Space (10f);
var centeredMiniStyle = new GUIStyle (EditorStyles.miniLabel);
centeredMiniStyle.alignment = TextAnchor.MiddleCenter;
EditorGUILayout.LabelField ("Don't add this component manually to a Game Object", centeredMiniStyle);
}
}
}
#endif
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Web;
using System.Xml.Linq;
using Tomelt.ContentManagement;
using Tomelt.Core.Settings.Models;
using Tomelt.Data;
using Tomelt.Data.Migration;
using Tomelt.Data.Migration.Interpreters;
using Tomelt.Data.Migration.Schema;
using Tomelt.Environment;
using Tomelt.Environment.Configuration;
using Tomelt.Environment.Descriptor;
using Tomelt.Environment.Descriptor.Models;
using Tomelt.Environment.Extensions;
using Tomelt.Environment.ShellBuilders;
using Tomelt.Environment.State;
using Tomelt.Localization.Services;
using Tomelt.Logging;
using Tomelt.Recipes.Models;
using Tomelt.Recipes.Services;
using Tomelt.Security;
using Tomelt.Settings;
using Tomelt.Utility.Extensions;
namespace Tomelt.Setup.Services {
[TomeltFeature("Tomelt.Setup.Services")]
public class SetupService : Component, ISetupService {
private readonly ShellSettings _shellSettings;
private readonly ITomeltHost _tomeltHost;
private readonly IShellSettingsManager _shellSettingsManager;
private readonly IShellContainerFactory _shellContainerFactory;
private readonly ICompositionStrategy _compositionStrategy;
private readonly IProcessingEngine _processingEngine;
private readonly IRecipeHarvester _recipeHarvester;
private IEnumerable<Recipe> _recipes;
public SetupService(
ShellSettings shellSettings,
ITomeltHost tomeltHost,
IShellSettingsManager shellSettingsManager,
IShellContainerFactory shellContainerFactory,
ICompositionStrategy compositionStrategy,
IProcessingEngine processingEngine,
IRecipeHarvester recipeHarvester) {
_shellSettings = shellSettings;
_tomeltHost = tomeltHost;
_shellSettingsManager = shellSettingsManager;
_shellContainerFactory = shellContainerFactory;
_compositionStrategy = compositionStrategy;
_processingEngine = processingEngine;
_recipeHarvester = recipeHarvester;
}
public ShellSettings Prime() {
return _shellSettings;
}
public IEnumerable<Recipe> Recipes() {
if (_recipes == null) {
var recipes = new List<Recipe>();
recipes.AddRange(_recipeHarvester.HarvestRecipes().Where(recipe => recipe.IsSetupRecipe));
_recipes = recipes;
}
return _recipes;
}
public string Setup(SetupContext context) {
var initialState = _shellSettings.State;
try {
return SetupInternal(context);
}
catch {
_shellSettings.State = initialState;
throw;
}
}
private string SetupInternal(SetupContext context) {
string executionId;
Logger.Information("Running setup for tenant '{0}'.", _shellSettings.Name);
// The vanilla Tomelt distibution has the following features enabled.
string[] hardcoded = {
// Framework
"Tomelt.Framework",
// Core
"Common", "Containers", "Contents", "Dashboard", "Feeds", "Navigation","Scheduling", "Settings", "Shapes", "Title",
// Modules
"Tomelt.Pages", "Tomelt.ContentPicker", "Tomelt.Themes", "Tomelt.Users", "Tomelt.Roles", "Tomelt.Modules",
"PackagingServices", "Tomelt.Packaging", "Gallery", "Tomelt.Recipes"
};
context.EnabledFeatures = hardcoded.Union(context.EnabledFeatures ?? Enumerable.Empty<string>()).Distinct().ToList();
// Set shell state to "Initializing" so that subsequent HTTP requests are responded to with "Service Unavailable" while Tomelt is setting up.
_shellSettings.State = TenantState.Initializing;
var shellSettings = new ShellSettings(_shellSettings);
if (String.IsNullOrEmpty(shellSettings.DataProvider)) {
shellSettings.DataProvider = context.DatabaseProvider;
shellSettings.DataConnectionString = context.DatabaseConnectionString;
shellSettings.DataTablePrefix = context.DatabaseTablePrefix;
}
shellSettings.EncryptionAlgorithm = "AES";
// Randomly generated key.
shellSettings.EncryptionKey = SymmetricAlgorithm.Create(shellSettings.EncryptionAlgorithm).Key.ToHexString();
shellSettings.HashAlgorithm = "HMACSHA256";
// Randomly generated key.
shellSettings.HashKey = HMAC.Create(shellSettings.HashAlgorithm).Key.ToHexString();
var shellDescriptor = new ShellDescriptor {
Features = context.EnabledFeatures.Select(name => new ShellFeature { Name = name })
};
var shellBlueprint = _compositionStrategy.Compose(shellSettings, shellDescriptor);
// Initialize database explicitly, and store shell descriptor.
using (var bootstrapLifetimeScope = _shellContainerFactory.CreateContainer(shellSettings, shellBlueprint)) {
using (var environment = bootstrapLifetimeScope.CreateWorkContextScope()) {
// Check if the database is already created (in case an exception occurred in the second phase).
var schemaBuilder = new SchemaBuilder(environment.Resolve<IDataMigrationInterpreter>());
var installationPresent = true;
try {
var tablePrefix = String.IsNullOrEmpty(shellSettings.DataTablePrefix) ? "" : shellSettings.DataTablePrefix + "_";
schemaBuilder.ExecuteSql("SELECT * FROM " + tablePrefix + "Settings_ShellDescriptorRecord");
}
catch {
installationPresent = false;
}
if (installationPresent) {
throw new TomeltException(T("A previous Tomelt installation was detected in this database with this table prefix."));
}
// Workaround to avoid some Transaction issue for PostgreSQL.
environment.Resolve<ITransactionManager>().RequireNew();
schemaBuilder.CreateTable("Tomelt_Framework_DataMigrationRecord", table => table
.Column<int>("Id", column => column.PrimaryKey().Identity())
.Column<string>("DataMigrationClass")
.Column<int>("Version"));
schemaBuilder.AlterTable("Tomelt_Framework_DataMigrationRecord",
table => table.AddUniqueConstraint("UC_DMR_DataMigrationClass_Version", "DataMigrationClass", "Version"));
var dataMigrationManager = environment.Resolve<IDataMigrationManager>();
dataMigrationManager.Update("Settings");
foreach (var feature in context.EnabledFeatures) {
dataMigrationManager.Update(feature);
}
environment.Resolve<IShellDescriptorManager>().UpdateShellDescriptor(
0,
shellDescriptor.Features,
shellDescriptor.Parameters);
}
}
// In effect "pump messages" see PostMessage circa 1980.
while (_processingEngine.AreTasksPending())
_processingEngine.ExecuteNextTask();
// Creating a standalone environment.
// in theory this environment can be used to resolve any normal components by interface, and those
// components will exist entirely in isolation - no crossover between the safemode container currently in effect.
using (var environment = _tomeltHost.CreateStandaloneEnvironment(shellSettings)) {
try {
executionId = CreateTenantData(context, environment);
}
catch {
environment.Resolve<ITransactionManager>().Cancel();
throw;
}
}
_shellSettingsManager.SaveSettings(shellSettings);
return executionId;
}
private string CreateTenantData(SetupContext context, IWorkContextScope environment) {
// Create site owner.
var membershipService = environment.Resolve<IMembershipService>();
var user = membershipService.CreateUser(
new CreateUserParams(context.AdminUsername, context.AdminPassword,
String.Empty, String.Empty, String.Empty, true));
// Set site owner as current user for request (it will be set as the owner of all content items).
var authenticationService = environment.Resolve<IAuthenticationService>();
authenticationService.SetAuthenticatedUserForRequest(user);
// Set site name and settings.
var siteService = environment.Resolve<ISiteService>();
var siteSettings = siteService.GetSiteSettings().As<SiteSettingsPart>();
siteSettings.SiteSalt = Guid.NewGuid().ToString("N");
siteSettings.SiteName = context.SiteName;
siteSettings.SuperUser = context.AdminUsername;
siteSettings.SiteCulture = "en-US";
// Add default culture.
var cultureManager = environment.Resolve<ICultureManager>();
cultureManager.AddCulture("en-US");
var recipeManager = environment.Resolve<IRecipeManager>();
var recipe = context.Recipe;
var executionId = recipeManager.Execute(recipe);
// Once the recipe has finished executing, we need to update the shell state to "Running", so add a recipe step that does exactly that.
var recipeStepQueue = environment.Resolve<IRecipeStepQueue>();
var recipeStepResultRecordRepository = environment.Resolve<IRepository<RecipeStepResultRecord>>();
var activateShellStep = new RecipeStep(Guid.NewGuid().ToString("N"), recipe.Name, "ActivateShell", new XElement("ActivateShell"));
recipeStepQueue.Enqueue(executionId, activateShellStep);
recipeStepResultRecordRepository.Create(new RecipeStepResultRecord {
ExecutionId = executionId,
RecipeName = recipe.Name,
StepId = activateShellStep.Id,
StepName = activateShellStep.Name
});
// Null check: temporary fix for running setup in command line.
if (HttpContext.Current != null) {
authenticationService.SignIn(user, true);
}
return executionId;
}
}
} |
using UnityEngine;
public class Damage : MonoBehaviour
{
public int damage = 1;
public GameObject explosion;
void OnTriggerEnter(Collider other)
{
var health = other.GetComponent<Health>();
if (health != null)
{
health.TakeDamage(damage);
}
if (other.name == "CubeRoomEnv")
{
Debug.Log("Wall hit, explosion effect");
Destroy(gameObject);
//Instantiate(explosion, transform.position, Quaternion.identity);
}
}
}
|
using System.Collections.Specialized;
using System.Windows;
namespace Crystal.Plot2D
{
public class DataHeightConstraint : ViewportConstraint, ISupportAttachToViewport
{
private double yEnlargeCoeff = 1.1;
public double YEnlargeCoeff
{
get { return yEnlargeCoeff; }
set
{
if (yEnlargeCoeff != value)
{
yEnlargeCoeff = value;
RaiseChanged();
}
}
}
public override DataRect Apply(DataRect oldDataRect, DataRect newDataRect, Viewport2D viewport)
{
DataRect overallBounds = DataRect.Empty;
foreach (var chart in viewport.ContentBoundsHosts)
{
var plotterElement = chart as IPlotterElement;
var visual = viewport.Plotter.VisualBindings[plotterElement];
var points = PointsGraphBase.GetVisiblePoints(visual);
if (points != null)
{
// searching for indices of chart's visible points which are near left and right borders of newDataRect
double startX = newDataRect.XMin;
double endX = newDataRect.XMax;
if (points[0].X > endX || points[points.Count - 1].X < startX)
{
continue;
}
int startIndex = -1;
// we assume that points are sorted by x values ascending
if (startX <= points[0].X)
{
startIndex = 0;
}
else
{
for (int i = 1; i < points.Count - 1; i++)
{
if (points[i].X <= startX && startX < points[i + 1].X)
{
startIndex = i;
break;
}
}
}
int endIndex = points.Count;
if (points[points.Count - 1].X < endX)
{
endIndex = points.Count;
}
else
{
for (int i = points.Count - 1; i >= 1; i--)
{
if (points[i - 1].X <= endX && endX < points[i].X)
{
endIndex = i;
break;
}
}
}
Rect bounds = Rect.Empty;
for (int i = startIndex; i < endIndex; i++)
{
bounds.Union(points[i]);
}
if (startIndex > 0)
{
Point pt = GetInterpolatedPoint(startX, points[startIndex], points[startIndex - 1]);
bounds.Union(pt);
}
if (endIndex < points.Count - 1)
{
Point pt = GetInterpolatedPoint(endX, points[endIndex], points[endIndex + 1]);
bounds.Union(pt);
}
overallBounds.Union(bounds);
}
}
if (!overallBounds.IsEmpty)
{
double y = overallBounds.YMin;
double height = overallBounds.Height;
if (height == 0)
{
height = newDataRect.Height;
y -= height / 2;
}
newDataRect = new DataRect(newDataRect.XMin, y, newDataRect.Width, height);
newDataRect = DataRectExtensions.ZoomY(newDataRect, newDataRect.GetCenter(), yEnlargeCoeff);
}
return newDataRect;
}
private static Point GetInterpolatedPoint(double x, Point p1, Point p2)
{
double xRatio = (x - p1.X) / (p2.X - p1.X);
double y = (1 - xRatio) * p1.Y + xRatio * p2.Y;
return new Point(x, y);
}
#region ISupportAttach Members
void ISupportAttachToViewport.Attach(Viewport2D viewport)
{
((INotifyCollectionChanged)viewport.ContentBoundsHosts).CollectionChanged += OnContentBoundsHostsChanged;
foreach (var item in viewport.ContentBoundsHosts)
{
if (item is PointsGraphBase chart)
{
chart.ProvideVisiblePoints = true;
}
}
}
private void OnContentBoundsHostsChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.NewItems != null)
{
foreach (var item in e.NewItems)
{
if (item is PointsGraphBase chart)
{
chart.ProvideVisiblePoints = true;
}
}
}
// todo probably set ProvideVisiblePoints to false on OldItems
}
void ISupportAttachToViewport.Detach(Viewport2D viewport)
{
((INotifyCollectionChanged)viewport.ContentBoundsHosts).CollectionChanged -= OnContentBoundsHostsChanged;
}
#endregion
}
}
|
using System;
namespace UseFul.Uteis
{
public class CustomErro
{
public static Exception Erro(string mensagem)
{
throw new CustomException(mensagem);
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace OpHomeSecurity.Web.Models
{
public class TestimonialModel
{
public System.Guid TestimonialId { get; set; }
public string Testimonial { get; set; }
public Nullable<bool> Active { get; set; }
public string ByName { get; set; }
public string Location { get; set; }
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Vuforia;
public class cloud_handler : MonoBehaviour, IObjectRecoEventHandler
{
public ImageTargetBehaviour ImageTargetTemplate;
private CloudRecoBehaviour mCloudRecoBehaviour;
private bool mIsScanning = false;
public static string mTargetMetadata = "";
// Use this for initialization
void Start()
{
// register this event handler at the cloud reco behaviour
mCloudRecoBehaviour = GetComponent<CloudRecoBehaviour>(); //클라우드 모델을 받는다.
if (mCloudRecoBehaviour)
{
mCloudRecoBehaviour.RegisterEventHandler(this);
}
}
//스캔 에러 관련 예외 처리문
public void OnInitialized(TargetFinder targetFinder)
{
Debug.Log("Cloud Reco initialized");
}
public void OnInitError(TargetFinder.InitState initError)
{
Debug.Log("Cloud Reco init error " + initError.ToString());
}
public void OnUpdateError(TargetFinder.UpdateState updateError)
{
Debug.Log("Cloud Reco update error " + updateError.ToString());
}
public void OnStateChanged(bool scanning) //스캔변화값을 읽어주는 함수
{
mIsScanning = scanning;
if (scanning)
{
// clear all known trackables
var tracker = TrackerManager.Instance.GetTracker<ObjectTracker>();
tracker.GetTargetFinder<ImageTargetFinder>().ClearTrackables(false);
}
}
// Here we handle a cloud target recognition event
//
public void OnNewSearchResult(TargetFinder.TargetSearchResult targetSearchResult)
{
TargetFinder.CloudRecoSearchResult cloudRecoSearchResult =
(TargetFinder.CloudRecoSearchResult)targetSearchResult;
// do something with the target metadata
mTargetMetadata = cloudRecoSearchResult.MetaData;
// stop the target finder (i.e. stop scanning the cloud)
mCloudRecoBehaviour.CloudRecoEnabled = false;
// Build augmentation based on target
if (ImageTargetTemplate)
{
// enable the new result with the same ImageTargetBehaviour:
ObjectTracker tracker = TrackerManager.Instance.GetTracker<ObjectTracker>();
tracker.GetTargetFinder<ImageTargetFinder>().EnableTracking(targetSearchResult, ImageTargetTemplate.gameObject);
Debug.Log(mTargetMetadata);
}
}
void OnGUI()
{
GUIStyle style = new GUIStyle(GUI.skin.button);
style.fontSize = 30;
// Display current 'scanning' status
// GUI.Box (new Rect(100,100,200,50), mIsScanning ? "Scanning" : "Not scanning");
// // Display metadata of latest detected cloud-target
// GUI.Box (new Rect(100,200,200,50), "Metadata: " + mTargetMetadata);
// If not scanning, show button
// so that user can restart cloud scanning
if (!mIsScanning)
{
if (GUI.Button(new Rect(100, 300, 300, 150), "Restart Scanning", style))
{
// Restart TargetFinder
mCloudRecoBehaviour.CloudRecoEnabled = true;
}
}
}
} |
using AsNum.XFControls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace RRExpress {
public class TabTemplateSelector : DataTemplateSelector {
public DataTemplate Normal { get; set; }
public DataTemplate Selected { get; set; }
protected override DataTemplate OnSelectTemplate(object item, BindableObject container) {
var selectable = (ISelectable)item;
if (selectable != null) {
return selectable.IsSelected ? Selected : Normal;
}
return null;
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Chillingplace : MonoBehaviour
{
[SerializeField]private List<GameObject> Sits;
private GameManager manager;
[SerializeField]private int cost = 450;
public int Cost { get => cost; set => cost = value; }
//public int Cost { get => cost; set => cost = value; }
private void Start()
{
manager = GameManager.instance;
for (int i = 0; i < transform.childCount; i++)
{
if (transform.GetChild(i).tag == "Sit")
{
GameObject a = transform.GetChild(i).gameObject;
Sits.Add(a);
}
}
manager.Chilingspot.Add(gameObject);
for(int i = 0; i < manager.Allregisteredstudents.Count; i++)
{
if (manager.Allregisteredstudents[i].GetComponent<StudentMono>().Chillsit == null)
{
manager.Allregisteredstudents[i].GetComponent<StudentMono>().GetPlaceoncafeteria();
}
}
}
public bool IsthereSpace()
{
int count = 0;
foreach (GameObject sit in Sits)
{
if (sit.GetComponent<SitUsed>().Ocupied == false)
count++;
}
if (count > 0)
return true;
else return false;
}
public GameObject AvalableSit()
{
List<GameObject> tep = new List<GameObject>();
foreach (GameObject sit in Sits)
{
if (sit.GetComponent<SitUsed>().Ocupied == false)
tep.Add(sit);
}
int a = Random.Range(0, tep.Count);
tep[a].GetComponent<SitUsed>().Ocupied = true;
return tep[a];
}
void Update()
{
}
}
|
namespace WitsmlExplorer.Api.Jobs.Common
{
public class WellReference
{
public string WellUid { get; set; }
}
}
|
using Newtonsoft.Json;
using System;
namespace CoingeckoPriceData
{
[Serializable]
public class CoinInformation
{
[JsonProperty]
private string id;
[JsonProperty]
private string symbol;
[JsonProperty]
private CoinImage image;
[JsonProperty]
private MarketData market_data;
public string Id { get => id; set => id = value; }
public string Symbol { get => symbol; set => symbol = value; }
public CoinImage Image { get => image; set => image = value; }
public MarketData Market_data { get => market_data; set => market_data = value; }
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Presentation.QLBSX_BUS_WebService;
/**
* Tên Đề Tài; Phần Mền Quản Lý Biển Số Xe và Vi Phạm Giao Thông(VLNM (Vehicle license number management))
* Ho tên sinh viên:
* 1. Phan Nhật Tiến 0812515
* 2. Huỳnh Công Toàn 0812527
*
* GVHD. Trần Minh Triết
**/
namespace Presentation
{
public partial class F_ThemXuPhat : Form
{
private QLBSX_BUS_WebServiceSoapClient ws = new QLBSX_BUS_WebServiceSoapClient();
public F_ThemXuPhat()
{
InitializeComponent();
}
private void F_ThemChiTietHanhVi_Load(object sender, EventArgs e)
{
NapDanhSachLoi(cbb_TenHanhVi);
List<BienSoXe> dsBS = new List<BienSoXe>();
dsBS = ws.LayDanhSachBSXTongQuat().ToList();
foreach (BienSoXe bs in dsBS)
if(bs.VoHieuHoa == false)
cbb_BienSo.Items.Add(bs.BienSo);
}
private void button1_Click(object sender, EventArgs e)
{
if (cbb_TenHanhVi.Text != "" && cbb_BienSo.Text != "" && tb_NguoiLap.Text != "" && tb_TienPhat.Text != "")
{
ChiTietHVVPDTO ct = new ChiTietHVVPDTO();
ct.BienSo = ws.TraCuuBSXTheoBienSo(cbb_BienSo.SelectedItem.ToString());
ct.HanhVi = ws.TraCuuHanhViTheoTenHanhVi(cbb_TenHanhVi.SelectedItem.ToString());
ct.NguoiLapBienBan = tb_NguoiLap.Text;
ct.ThoiGian = dtp_ThoiGian.Value;
ct.TienPhat = double.Parse(tb_TienPhat.Text);
if (ws.ThemChiTietHanhVi(ct))
MessageBox.Show("Xử phạt biển số \"" + cbb_BienSo.Text + "\" vi phạm lỗi \"" + cbb_TenHanhVi.Text + "\" thành công.", "Thông báo", MessageBoxButtons.OK);
else
MessageBox.Show("Xử phạt biển số \"" + cbb_BienSo.Text + "\" vi phạm lỗi \"" + cbb_TenHanhVi.Text + "\" thất bại.", "Thông báo", MessageBoxButtons.OK);
}
else
MessageBox.Show("Bạn điền còn thiếu, hoặc tiền phạt bạn nhập không đúng! Xin kiểm tra lại.", "Lỗi", MessageBoxButtons.OK);
}
private void bntThoat_Click(object sender, EventArgs e)
{
this.Close();
}
private void cbb_TenHanhVi_MouseHover(object sender, EventArgs e)
{
toolTip1.SetToolTip(this.cbb_TenHanhVi, "Chọn lỗi vi phạm giao thông.");
}
private void cbb_BienSo_MouseHover(object sender, EventArgs e)
{
toolTip1.SetToolTip(this.cbb_BienSo, "Chọn biển số vi phạm giao thông.");
}
private void dtp_ThoiGian_MouseHover(object sender, EventArgs e)
{
toolTip1.SetToolTip(this.dtp_ThoiGian, "Điền thời gian vi phạm giao thông.");
}
private void tb_NguoiLap_MouseHover(object sender, EventArgs e)
{
toolTip1.SetToolTip(this.tb_NguoiLap, "Điền thông tin người lập biên bản.");
}
private void tb_TienPhat_MouseHover(object sender, EventArgs e)
{
toolTip1.SetToolTip(this.tb_TienPhat, "Điền số tiền phạt: là là số.");
}
private void bntTL_Click(object sender, EventArgs e)
{
F_ThemLoiVP frm = new F_ThemLoiVP();
frm.Show();
}
private void NapDanhSachLoi(ComboBox cbb)
{
cbb.Items.Clear();
List<HanhViViPhamDTO> chiTiet = new List<HanhViViPhamDTO>();
chiTiet = ws.LayDanhSachHanhVi().ToList();
var query = from n in chiTiet
where n.VoHieuHoa == false
orderby n.TenHanhVi
select n;
foreach (var ct in query)
cbb.Items.Add(ct.TenHanhVi);
}
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace WpfAppParking.Model
{
class Parking : INotifyPropertyChanged, IDataErrorInfo
{
public event PropertyChangedEventHandler PropertyChanged;
private int id;
private int plaats_id;
private string naam;
public int ID
{
get
{
return id;
}
set
{
id = value;
NotifyPropertyChanged();
}
}
public int Plaats_ID
{
get
{
return plaats_id;
}
set
{
plaats_id = value;
NotifyPropertyChanged();
}
}
public string Naam
{
get
{
return naam;
}
set
{
naam = value;
NotifyPropertyChanged();
}
}
public string Error
{
get
{
return string.Empty;
}
}
public string this[string columnName]
{
get
{
string result = string.Empty;
return result;
}
}
public Parking()
{}
public void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using NewBeeProject.Models;
using Prism.Services;
using Refit;
using Xamarin.Essentials;
namespace NewBeeProject.Services
{
public class APIService : IAPIService
{
NetworkAccess CurrentConnection = Connectivity.NetworkAccess;
INewBeeAPI ApiResponse = RestService.For<INewBeeAPI>(Config.APIURL);
//Student services
async public Task<Student> CheckLogin(string UserID, string InsertedPassword)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
if(await ApiResponse.VerifyStudent(UserID, InsertedPassword))
{
return await ApiResponse.GetStudent(UserID);
}
return null;
}
await NoInternetAlert();
return null;
}
async public Task<bool> RegisterStudent(Student NewStudent)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
await ApiResponse.RegisterStudent(NewStudent);
return true;
}
await NoInternetAlert();
return false;
}
async public Task<Student> UpdateStudent(string UserID, Student UpdatedStudent)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var ConfirmedStudent = await ApiResponse.UpdateStudent(UserID,UpdatedStudent);
return ConfirmedStudent;
}
await NoInternetAlert();
return null;
}
//Course Services
async public Task<Course> GetCourse(string CourseID)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var CourseResult = await ApiResponse.GetCourse(CourseID);
return CourseResult;
}
await NoInternetAlert();
return null;
}
async public Task<List<Course>> GetAllCourses()
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var CourseResult = await ApiResponse.GetAllCourses();
return CourseResult;
}
await NoInternetAlert();
return null;
}
//Directory services
async public Task<Directory> GetDirectory(string Area)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var DirectoryResult = await ApiResponse.GetDirectory(Area);
return DirectoryResult;
}
await NoInternetAlert();
return null;
}
async public Task<List<Directory>> GetAllDirectories()
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var DirectoryResult = await ApiResponse.GetAllDirectories();
return DirectoryResult;
}
await NoInternetAlert();
return null;
}
//Schedule Services
async public Task<bool> RegisterCourse(string UserID, string CourseID)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
Schedule NewSchedule = new Schedule(UserID, CourseID);
var RegisteredCourse = await ApiResponse.RegisterCourse(NewSchedule);
return RegisteredCourse;
}
await NoInternetAlert();
return false;
}
async public Task<List<Course>> GetSchedule(string UserID)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var DirectoryResult = await ApiResponse.GetSchedule(UserID);
return DirectoryResult;
}
await NoInternetAlert();
return null;
}
async public Task<bool> DeleteSchedule(string UserID, string CourseID)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var DeleteCourse = await ApiResponse.DeleteSchedule(UserID,CourseID);
return DeleteCourse;
}
await NoInternetAlert();
return false;
}
async public Task<CollegeTask> RegisterTask(CollegeTask NewTask)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var TaskResult = await ApiResponse.AddTask(NewTask);
return TaskResult;
}
await NoInternetAlert();
return null;
}
async public Task<List<CollegeTask>> GetAllTasks(string StudentID)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
var TaskList = await ApiResponse.GetTasks(StudentID);
return TaskList;
}
await NoInternetAlert();
return null;
}
async public Task UpdateTask(string TaskID)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
await ApiResponse.UpdateTask(TaskID);
return;
}
await NoInternetAlert();
return;
}
async public Task DeleteTask(string TaskID)
{
if (CurrentConnection.Equals(NetworkAccess.Internet))
{
await ApiResponse.DeleteTask(TaskID);
return;
}
await NoInternetAlert();
return;
}
async public Task NoInternetAlert()
{
await App.Current.MainPage.DisplayAlert("No internet", "No internet conenction try again later", "Ok");
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace MISA.Common.Models
{
public class GroupCustomer
{
public GroupCustomer()
{
GroupCustomerId = Guid.NewGuid();
}
public Guid GroupCustomerId { get; set; }
public string GroupCustomerCode { get; set; }
public string GroupCustomerName { get; set; }
public DateTime CreateDate { get; set; }
public string CreateBy { get; set; }
public DateTime ModifiedDay { get; set; }
public string ModifiedBy { get; set; }
}
}
|
using AsNum.XFControls.Templates;
using Xamarin.Forms;
namespace AsNum.XFControls {
/// <summary>
/// 单选按钮(Button)组
/// </summary>
public class RadioButtonGroup : RadioGroupBase {
#region ShowRadio
/// <summary>
/// 是否显示图标
/// </summary>
public static BindableProperty ShowRadioProperty =
BindableProperty.Create("ShowRadio",
typeof(bool),
typeof(RadioButtonGroup),
false
);
/// <summary>
/// 是否显示图标
/// </summary>
public bool ShowRadio {
get {
return (bool)this.GetValue(ShowRadioProperty);
}
set {
this.SetValue(ShowRadioProperty, value);
}
}
#endregion
public RadioButtonGroup() {
this.SelectedItemControlTemplate = new DefaultRadioButtonSelectedControlTemplate();
this.UnSelectedItemControlTemplate = new DefaultRadioButtonUnSelectedControlTemplate();
}
protected override Layout<View> GetContainer() {
var layout = new WrapLayout();
layout.SetBinding(View.HorizontalOptionsProperty, new Binding(nameof(this.HorizontalOptions), source: this));
return layout;
}
protected override Radio GetRadio(object data) {
var radio = base.GetRadio(data);
radio.SetBinding(Radio.ShowRadioProperty, new Binding("ShowRadio", source: this));
//if (!this.ShowRadio)
// radio.TextAlignment = TextAlignment.Center;
return radio;
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.