本文整理汇总了C#中BetterList类的典型用法代码示例。如果您正苦于以下问题:C# BetterList类的具体用法?C# BetterList怎么用?C# BetterList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BetterList类属于命名空间,在下文中一共展示了BetterList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteToBuffers
public void WriteToBuffers(BetterList<Vector3> v, BetterList<Vector2> u, BetterList<Color32> c, BetterList<Vector3> n, BetterList<Vector4> t)
{
if ((this.mRtpVerts != null) && (this.mRtpVerts.size > 0))
{
if (n == null)
{
for (int i = 0; i < this.mRtpVerts.size; i++)
{
v.Add(this.mRtpVerts.buffer[i]);
u.Add(this.uvs.buffer[i]);
c.Add(this.cols.buffer[i]);
}
}
else
{
for (int j = 0; j < this.mRtpVerts.size; j++)
{
v.Add(this.mRtpVerts.buffer[j]);
u.Add(this.uvs.buffer[j]);
c.Add(this.cols.buffer[j]);
n.Add(this.mRtpNormal);
t.Add(this.mRtpTan);
}
}
}
}
示例2: New
public override CLS_Content.Value New(CLS_Content content, BetterList<CLS_Content.Value> _params)
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(SphereCollider);
val.value = new SphereCollider();
return val;
}
示例3: activate
public void activate(BetterList<RacingAI> aFinishers) {
this.gameObject.SetActive(true);
aFinishers.Sort(finishPositionSort);
int i = 0;
for(i = 0;i<aFinishers.size;i++) {
completeMembers[i].init(aFinishers[i],i);
completeMembers[i].gameObject.SetActive(true);
}
if(ChampionshipSeason.ACTIVE_SEASON.getTeamFromDriver(completeMembers[0].driver.driverRecord)==ChampionshipSeason.ACTIVE_SEASON.getUsersTeam()) {
MobileNativeRateUs ratePopUp = new MobileNativeRateUs("Enjoying Racing Manager?", "Rate us 5 Stars to help with future updates!","5 Stars","Not Right Now","Never!");
#if UNITY_IOS
ratePopUp.SetAppleId("975017895");
#endif
#if UNITY_ANDROID
ratePopUp.SetAndroidAppUrl("market://details?id=com.blueomega.gpmanager");
#endif
ratePopUp.addEventListener(BaseEvent.COMPLETE,OnRatePopUpClose);
ratePopUp.Start();
}
for(int c = i;c<completeMembers.Count;c++) {
completeMembers[i].gameObject.SetActive(false);
}
}
示例4: New
public override CLS_Content.Value New(CLS_Content content, BetterList<CLS_Content.Value> _params)
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(UnityEngine.Random);
val.value = new UnityEngine.Random();
return val;
}
示例5: New
public override CLS_Content.Value New(CLS_Content content, BetterList<CLS_Content.Value> _params)
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(Time);
val.value = new Time();
return val;
}
示例6: GetListOfSprites
public BetterList<string> GetListOfSprites(string match)
{
if (this.mReplacement != null)
{
return this.mReplacement.GetListOfSprites(match);
}
if (string.IsNullOrEmpty(match))
{
return this.GetListOfSprites();
}
if (this.mSprites.Count == 0)
{
this.Upgrade();
}
BetterList<string> list = new BetterList<string>();
int num = 0;
int count = this.mSprites.Count;
while (num < count)
{
UISpriteData data = this.mSprites[num];
if (((data != null) && !string.IsNullOrEmpty(data.name)) && string.Equals(match, data.name, StringComparison.OrdinalIgnoreCase))
{
list.Add(data.name);
return list;
}
num++;
}
char[] separator = new char[] { ' ' };
string[] strArray = match.Split(separator, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < strArray.Length; i++)
{
strArray[i] = strArray[i].ToLower();
}
int num4 = 0;
int num5 = this.mSprites.Count;
while (num4 < num5)
{
UISpriteData data2 = this.mSprites[num4];
if ((data2 != null) && !string.IsNullOrEmpty(data2.name))
{
string str = data2.name.ToLower();
int num6 = 0;
for (int j = 0; j < strArray.Length; j++)
{
if (str.Contains(strArray[j]))
{
num6++;
}
}
if (num6 == strArray.Length)
{
list.Add(data2.name);
}
}
num4++;
}
return list;
}
示例7: Call
public CLS_Content.Value Call(CLS_Content content, BetterList<CLS_Content.Value> param)
{
string output = "trace:";
for (int i = 0; i < param.size; i++)
{
output += " " + param[i].value;
}
UnityEngine.Debug.Log(output);
//content.environment.logger.Log(output);
return CLS_Content.Value.Void;
}
示例8: MemberCall
public override CLS_Content.Value MemberCall(CLS_Content content, object object_this, string function, BetterList<CLS_Content.Value> _params, bool isBaseCall = false)
{
if (function == "ClosestPointOnBounds")
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(Vector3);
val.value = ((Collider)object_this).ClosestPointOnBounds(((Vector3)_params[0].value));
return val;
}
return base.MemberCall(content, object_this, function, _params, isBaseCall);
}
示例9: OnEnable
void OnEnable ()
{
Dictionary<string, string[]> dict = Localization.dictionary;
if (dict.Count > 0)
{
mKeys = new BetterList<string>();
foreach (KeyValuePair<string, string[]> pair in dict)
{
if (pair.Key == "KEY") continue;
mKeys.Add(pair.Key);
}
mKeys.Sort(delegate (string left, string right) { return left.CompareTo(right); });
}
}
示例10: OnFill
/// <summary>
/// Virtual function called by the UIScreen that fills the buffers.
/// </summary>
public override void OnFill(BetterList<Vector3> verts, BetterList<Vector2> uvs, BetterList<Color> cols)
{
verts.Add(new Vector3(1f, 0f, 0f));
verts.Add(new Vector3(1f, -1f, 0f));
verts.Add(new Vector3(0f, -1f, 0f));
verts.Add(new Vector3(0f, 0f, 0f));
uvs.Add(Vector2.one);
uvs.Add(new Vector2(1f, 0f));
uvs.Add(Vector2.zero);
uvs.Add(new Vector2(0f, 1f));
cols.Add(color);
cols.Add(color);
cols.Add(color);
cols.Add(color);
}
示例11: ApplyShadow
private void ApplyShadow(BetterList<Vector3> verts, BetterList<Vector2> uvs, BetterList<Color32> cols, int start, int end, float x, float y)
{
Color mEffectColor = this.mEffectColor;
mEffectColor.a *= base.alpha * base.mPanel.finalAlpha;
Color32 color2 = ((this.bitmapFont == null) || !this.bitmapFont.premultipliedAlpha) ? mEffectColor : NGUITools.ApplyPMA(mEffectColor);
for (int i = start; i < end; i++)
{
verts.Add(verts.buffer[i]);
uvs.Add(uvs.buffer[i]);
cols.Add(cols.buffer[i]);
Vector3 vector = verts.buffer[i];
vector.x += x;
vector.y += y;
verts.buffer[i] = vector;
cols.buffer[i] = color2;
}
}
示例12: OnFill
public override void OnFill (BetterList<Vector3> verts, BetterList<Vector2> uvs, BetterList<Color32> cols)
{
base.OnFill (verts, uvs, cols);
Vector2 uv0 = new Vector2(mOuterUV.xMin, mOuterUV.yMin);
Vector2 uv1 = new Vector2(mOuterUV.xMax, mOuterUV.yMax);
verts.Add(new Vector3(1f, 0f, 0f));
verts.Add(new Vector3(1f, 0f, extrusionDepth));
verts.Add(new Vector3(1f, -1f, extrusionDepth));
verts.Add(new Vector3(1f, -1f, 0f));
verts.Add(new Vector3(1f, 0f, 0f));
verts.Add(new Vector3(0f, 0f, 0f));
verts.Add(new Vector3(0f, 0f, extrusionDepth));
verts.Add(new Vector3(1f, 0f, extrusionDepth));
verts.Add(new Vector3(0f, -1f, 0f));
verts.Add(new Vector3(0f, -1f, extrusionDepth));
verts.Add(new Vector3(0f, 0f, extrusionDepth));
verts.Add(new Vector3(0f, 0f, 0f));
verts.Add(new Vector3(1f, -1f, extrusionDepth));
verts.Add(new Vector3(0f, -1f, extrusionDepth));
verts.Add(new Vector3(0f, -1f, 0f));
verts.Add(new Vector3(1f, -1f, 0f));
for( int i = 0 ; i < 4 ; i++ ) {
uvs.Add(uv1);
uvs.Add(new Vector2(uv1.x, uv0.y));
uvs.Add(uv0);
uvs.Add(new Vector2(uv0.x, uv1.y));
}
#if UNITY_3_5_4
Color col = color;
#else
Color32 col = color;
#endif
for( int i = 0 ; i < 16 ; i++ ) {
cols.Add(col);
}
}
示例13: Execute
/// <summary>
///
/// </summary>
/// <param name="list"></param>
public static void Execute(BetterList<System.Action> list)
{
if (list != null)
{
for (int i = 0; i < list.size; )
{
System.Action del = list[i];
if (del != null)
{
del();
if (i >= list.size) break;
if (list[i] != del) continue;
}
++i;
}
}
}
示例14: StaticCall
public override CLS_Content.Value StaticCall(CLS_Content content, string function, BetterList<CLS_Content.Value> _params)
{
if (function == "Equals")
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(bool);
val.value = Time.Equals(_params[0].value, _params[1].value);
return val;
}
else if (function == "ReferenceEquals")
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(bool);
val.value = Time.ReferenceEquals(_params[0].value, _params[1].value);
return val;
}
return base.StaticCall(content, function, _params);
}
示例15: MemberCall
public override CLS_Content.Value MemberCall(CLS_Content content, object object_this, string function, BetterList<CLS_Content.Value> _params, bool isBaseCall = false)
{
if (function == "Equals")
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(bool);
val.value = ((Time)object_this).Equals(_params[0].value);
return val;
}
else if (function == "ToString")
{
CLS_Content.Value val = new CLS_Content.Value();
val.type = typeof(string);
val.value = ((Time)object_this).ToString();
return val;
}
return base.MemberCall(content, object_this, function, _params, isBaseCall);
}