static public int constructor(IntPtr l)
 {
     UnityEngine.ClothRenderer o;
     o = new UnityEngine.ClothRenderer();
     pushObject(l, o);
     return(1);
 }
    static public int set_pauseWhenNotVisible(IntPtr l)
    {
        UnityEngine.ClothRenderer o = (UnityEngine.ClothRenderer)checkSelf(l);
        bool v;

        checkType(l, 2, out v);
        o.pauseWhenNotVisible = v;
        return(0);
    }
 static public int get_pauseWhenNotVisible(IntPtr l)
 {
     try {
         UnityEngine.ClothRenderer self = (UnityEngine.ClothRenderer)checkSelf(l);
         pushValue(l, self.pauseWhenNotVisible);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int get_pauseWhenNotVisible(IntPtr l)
 {
     try {
         UnityEngine.ClothRenderer self = (UnityEngine.ClothRenderer)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.pauseWhenNotVisible);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.ClothRenderer o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.ClothRenderer();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.ClothRenderer o;
         o=new UnityEngine.ClothRenderer();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.ClothRenderer o;
         o = new UnityEngine.ClothRenderer();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.ClothRenderer o;
         o = new UnityEngine.ClothRenderer();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_pauseWhenNotVisible(IntPtr l)
 {
     try {
         UnityEngine.ClothRenderer self = (UnityEngine.ClothRenderer)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.pauseWhenNotVisible = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int set_pauseWhenNotVisible(IntPtr l)
 {
     try {
         UnityEngine.ClothRenderer self = (UnityEngine.ClothRenderer)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.pauseWhenNotVisible = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #11
0
// fields

// properties
    static void ClothRenderer_pauseWhenNotVisible(JSVCall vc)
    {
        if (vc.bGet)
        {
            UnityEngine.ClothRenderer _this = (UnityEngine.ClothRenderer)vc.csObj;
            var result = _this.pauseWhenNotVisible;
            JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
        }
        else
        {
            System.Boolean            arg0  = (System.Boolean)JSApi.getBooleanS((int)JSApi.GetType.Arg);
            UnityEngine.ClothRenderer _this = (UnityEngine.ClothRenderer)vc.csObj;
            _this.pauseWhenNotVisible = arg0;
        }
    }
Example #12
0
    public void OnInitializeMesh()
    {
        rope.GenerateJointObjects();

        if (tube == null)
            tube = new RopeTubeRenderer(gameObject, true);

        mRender = gameObject.GetComponent<ClothRenderer>();
        if (mRender == null)
            mRender = gameObject.AddComponent<ClothRenderer>();

        mFilter = gameObject.GetComponent<InteractiveCloth>();
        if (mFilter == null)
            mFilter = gameObject.AddComponent<InteractiveCloth>();

        GenerateMesh();

        //if (useAutoTextureTiling)
        //    gameObject.GetComponent<ClothRenderer>().sharedMaterial.mainTextureScale = new Vector2(rope.Joints.Count / 2f, 1);

        if (gameObject.GetComponent<ClothRenderer>().sharedMaterial == null)
            gameObject.GetComponent<ClothRenderer>().sharedMaterial = (Material)Resources.Load("Materials/Rope", typeof(Material));
    }
Example #13
0
    //    CharacterController charControl;
    // Use this for initialization
    void Start()
    {
        speed = 5.0f;
        jumpSpeed = 50f;//25000f;
        clothManip = GetComponent<InteractiveCloth>();
        clothRenderer = GetComponent<ClothRenderer>();
        embers = GetComponent<ParticleSystem>();
        charControl = GetComponent<CharacterController>();

        embers.Stop ();

        curTime = 0f; lavaMaxTime = 10f;
        center = transform.position;
        Vector3 centerPlane = transform.position + new Vector3 (0, 0, transform.localScale [2]/2.0f);
        grounded = isOnLava = true;
        //		float radius = vertices [0].
        //		int i = 0;
        //		for (i = 0; i < vertices.Length; i ++)
        //			if (vertices [i].x == center.x)
        ////				if (vertices [i].y == center.y)
        //					break;
        //		Vector3 centerPlane = center;
        //		centerPlane.x = vertices [i].x;
        r = center - centerPlane;
        glow = transform.Find ("Glow").GetComponent<Light>();
        originalColour = glow.color;
        //		center = GetComponent<MeshFilter>().mesh.
    }
 static public int get_pauseWhenNotVisible(IntPtr l)
 {
     UnityEngine.ClothRenderer o = (UnityEngine.ClothRenderer)checkSelf(l);
     pushValue(l, o.pauseWhenNotVisible);
     return(1);
 }