当前位置: 首页>>代码示例>>C#>>正文


C# MegaModContext类代码示例

本文整理汇总了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;
	}
开发者ID:xiaopangoo,项目名称:MotionPlatform,代码行数:7,代码来源:MegaMorphOMatic.cs

示例2: Prepare

    public override bool Prepare(MegaModContext mc)
    {
        mat = Matrix4x4.identity;

        SetAxis(mat);
        return true;
    }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:7,代码来源:MegaBubble.cs

示例3: DrawGizmo

    public override void DrawGizmo(MegaModContext context)
    {
        base.DrawGizmo(context);

        Gizmos.color = Color.yellow;
        Gizmos.DrawWireCube(origin, size * 2.0f);
    }
开发者ID:mobeid,项目名称:NP_SIMULATOR,代码行数:7,代码来源:MegaDisplaceLimits.cs

示例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;
        }
    }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:25,代码来源:MegaMultiVolSelect.cs

示例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;
        }
    }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:30,代码来源:MegaRipple.cs

示例6: ModLateUpdate

	//public override bool ModLateUpdate(Modifiers mc)
	public override bool ModLateUpdate(MegaModContext mc)
	{
		if ( animate )
			percent += speed * Time.deltaTime;

		return Prepare(mc);
	}
开发者ID:xiaopangoo,项目名称:MotionPlatform,代码行数:8,代码来源:MegaWorldPathDeform.cs

示例7: ModLateUpdate

	public override bool ModLateUpdate(MegaModContext mc)
	{
		if ( animate )
			phase += Time.deltaTime * speed;

		return Prepare(mc);
	}
开发者ID:xiaopangoo,项目名称:MotionPlatform,代码行数:7,代码来源:MegaSinusCurve.cs

示例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;
    }
开发者ID:jsr2k1,项目名称:gato-book-test,代码行数:26,代码来源:MegaWaving.cs

示例9: Prepare

    public override bool Prepare(MegaModContext mc)
    {
        size = bbox.Size();
        amt = amount / 100.0f;

        return true;
    }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:7,代码来源:MegaHump.cs

示例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;
 }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:7,代码来源:MegaPivotAdjust.cs

示例11: Prepare

    public override bool Prepare(MegaModContext mc)
    {
        if ( normals != null )
            return true;

        return false;
    }
开发者ID:mobeid,项目名称:NP_SIMULATOR,代码行数:7,代码来源:MegaPush.cs

示例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;
    }
开发者ID:jsr2k1,项目名称:gato-book-test,代码行数:7,代码来源:MegaTreeBend.cs

示例13: ModLateUpdate

    public override bool ModLateUpdate(MegaModContext mc)
    {
        if ( Animate )
            Phase += Time.deltaTime * Freq;
        time = Phase;

        return Prepare(mc);
    }
开发者ID:schonstal,项目名称:madness,代码行数:8,代码来源:MegaVertNoise.cs

示例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);
	}
开发者ID:xiaopangoo,项目名称:MotionPlatform,代码行数:10,代码来源:MegaWave.cs

示例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);
    }
开发者ID:jsr2k1,项目名称:videojocjj,代码行数:56,代码来源:MegaPathDeform.cs


注:本文中的MegaModContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。