本文整理汇总了C#中MegaModContext类的典型用法代码示例。如果您正苦于以下问题:C# MegaModContext类的具体用法?C# MegaModContext怎么用?C# MegaModContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MegaModContext类属于命名空间,在下文中一共展示了MegaModContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Prepare
public override bool Prepare(MegaModContext mc)
{
if ( chanBank != null && chanBank.Count > 0 )
return true;
return false;
}
示例2: Prepare
public override bool Prepare(MegaModContext mc)
{
mat = Matrix4x4.identity;
SetAxis(mat);
return true;
}
示例3: DrawGizmo
public override void DrawGizmo(MegaModContext context)
{
base.DrawGizmo(context);
Gizmos.color = Color.yellow;
Gizmos.DrawWireCube(origin, size * 2.0f);
}
示例4: DrawGizmo
public override void DrawGizmo(MegaModContext context)
{
if ( ModEnabled )
{
base.DrawGizmo(context);
Matrix4x4 tm = gameObject.transform.localToWorldMatrix;
Gizmos.matrix = tm;
for ( int i = 0; i < volumes.Count; i++ )
{
if ( volumes[i].enabled && volumes[i].volType == MegaVolumeType.Box )
{
Gizmos.color = volumes[i].regcol; //Color.yellow;
Gizmos.DrawWireCube(volumes[i].origin, volumes[i].boxsize * 2.0f); // * 0.5f);
}
if ( volumes[i].enabled && volumes[i].volType == MegaVolumeType.Sphere )
{
Gizmos.color = volumes[i].regcol; //Color.yellow;
Gizmos.DrawWireSphere(volumes[i].origin, volumes[i].radius); // * 0.5f);
}
}
Gizmos.matrix = Matrix4x4.identity;
}
}
示例5: DrawGizmo
public override void DrawGizmo(MegaModContext context)
{
Gizmos.color = Color.yellow;
Matrix4x4 gtm = Matrix4x4.identity;
Vector3 pos = gizmoPos;
pos.x = -pos.x;
pos.y = -pos.y;
pos.z = -pos.z;
Vector3 scl = gizmoScale;
scl.x = 1.0f - (scl.x - 1.0f);
scl.y = 1.0f - (scl.y - 1.0f);
gtm.SetTRS(pos, Quaternion.Euler(gizmoRot), scl);
//if ( context.sourceObj != null )
//Gizmos.matrix = context.sourceObj.transform.localToWorldMatrix * gtm;
//else
//Gizmos.matrix = transform.localToWorldMatrix * gtm;
Gizmos.matrix = transform.localToWorldMatrix * gtm;
float r1 = 0.0f;
for ( int i = 0; i < circles; i++ )
{
float r = ((float)i / (float)circles) * radius;
MakeCircle(t, r, r1, amp, amp2, wave, phase, dy, segments);
r1 = r;
}
}
示例6: ModLateUpdate
//public override bool ModLateUpdate(Modifiers mc)
public override bool ModLateUpdate(MegaModContext mc)
{
if ( animate )
percent += speed * Time.deltaTime;
return Prepare(mc);
}
示例7: ModLateUpdate
public override bool ModLateUpdate(MegaModContext mc)
{
if ( animate )
phase += Time.deltaTime * speed;
return Prepare(mc);
}
示例8: Prepare
public override bool Prepare(MegaModContext mc)
{
if ( wave == 0.0f )
wave = 0.000001f;
dy = Decay / 1000.0f;
switch ( waveaxis )
{
case MegaAxis.X:
ix = 0;
iz = 2;
break;
case MegaAxis.Y:
ix = 1;
iz = 2;
break;
case MegaAxis.Z:
ix = 2;
iz = 0;
break;
}
return true;
}
示例9: Prepare
public override bool Prepare(MegaModContext mc)
{
size = bbox.Size();
amt = amount / 100.0f;
return true;
}
示例10: Prepare
public override bool Prepare(MegaModContext mc)
{
tm = Matrix4x4.identity;
invtm = tm.inverse;
mat = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(gizmoRot), gizmoScale);
return true;
}
示例11: Prepare
public override bool Prepare(MegaModContext mc)
{
if ( normals != null )
return true;
return false;
}
示例12: Prepare
public override bool Prepare(MegaModContext mc)
{
vWind.x = Mathf.Sin(WindDir * Mathf.Deg2Rad) * WindSpeed;
vWind.y = Mathf.Cos(WindDir * Mathf.Deg2Rad) * WindSpeed;
return true;
}
示例13: ModLateUpdate
public override bool ModLateUpdate(MegaModContext mc)
{
if ( Animate )
Phase += Time.deltaTime * Freq;
time = Phase;
return Prepare(mc);
}
示例14: ModLateUpdate
//public override bool ModLateUpdate(Modifiers mc)
public override bool ModLateUpdate(MegaModContext mc)
{
if ( animate )
{
t += Time.deltaTime * Speed;
phase = t;
}
return Prepare(mc);
}
示例15: DrawGizmo
public override void DrawGizmo(MegaModContext context)
{
//tm = Matrix4x4.identity;
//Matrix.Translate(ref tm, Offset);
//invtm = tm.inverse;
if ( !Prepare(context) )
return;
Vector3 min = context.bbox.min;
Vector3 max = context.bbox.max;
//Matrix4x4 gtm = Matrix4x4.identity;
//Vector3 pos = gizmoPos;
//pos.x = -pos.x;
//pos.y = -pos.y;
//pos.z = -pos.z;
//Vector3 scl = gizmoScale;
//scl.x = 1.0f - (scl.x - 1.0f);
//scl.y = 1.0f - (scl.y - 1.0f);
//gtm.SetTRS(pos, Quaternion.Euler(gizmoRot), scl);
if ( context.mod.sourceObj != null )
Gizmos.matrix = context.mod.sourceObj.transform.localToWorldMatrix; // * gtm;
else
Gizmos.matrix = transform.localToWorldMatrix; // * gtm;
//Gizmos.color = ModCol(); //Color.yellow;
corners[0] = new Vector3(min.x, min.y, min.z);
corners[1] = new Vector3(min.x, max.y, min.z);
corners[2] = new Vector3(max.x, max.y, min.z);
corners[3] = new Vector3(max.x, min.y, min.z);
corners[4] = new Vector3(min.x, min.y, max.z);
corners[5] = new Vector3(min.x, max.y, max.z);
corners[6] = new Vector3(max.x, max.y, max.z);
corners[7] = new Vector3(max.x, min.y, max.z);
DrawEdge(corners[0], corners[1]);
DrawEdge(corners[1], corners[2]);
DrawEdge(corners[2], corners[3]);
DrawEdge(corners[3], corners[0]);
DrawEdge(corners[4], corners[5]);
DrawEdge(corners[5], corners[6]);
DrawEdge(corners[6], corners[7]);
DrawEdge(corners[7], corners[4]);
DrawEdge(corners[0], corners[4]);
DrawEdge(corners[1], corners[5]);
DrawEdge(corners[2], corners[6]);
DrawEdge(corners[3], corners[7]);
ExtraGizmo(context);
}