Inheritance: UnityEngine.MonoBehaviour
Beispiel #1
0
 public PGameObject addChild(PGameObject obj)
 {
     if (obj)
     {
         obj.transform.parent = transform;
     }
     return(obj);
 }
Beispiel #2
0
        void Start()
        {
            PGameObject obj = gameObject.GetComponent <PGameObject>();

            if (obj)
            {
                depth = obj.graphics.sceneDepthStep * 0.5f;
            }
        }
Beispiel #3
0
        public void apply(GameObject gameObject)
        {
            PGameObject pg = gameObject.GetComponent <PGameObject>();

            if (pg)
            {
                switch (shapeType)
                {
                /*
                 * case ShapeType.LINES:
                 *  applyLine(gameObject);
                 *  pg.primitiveType = PGameObject.PrimitiveType.Shape2D;
                 *  break;
                 */
                default:
                    applyMesh(gameObject);
                    pg.primitiveType = PGameObject.PrimitiveType.Shape2D;
                    break;
                }
            }
        }
Beispiel #4
0
    public void init(PGraphics graphics)
    {
        g = graphics;
        g.beginKeep();
        obj = g.prefab("unitychanP5");
        //obj = g.box (1);
        //obj.addRigid();

        obj.transform.Rotate(0, 90, 0);
        obj.rigidBody.constraints |= RigidbodyConstraints.FreezePositionZ;
        g.endKeep();
    }
Beispiel #5
0
 protected virtual void buttonClick(string groupName, string name, PGameObject obj)
 {
 }
Beispiel #6
0
 protected override void buttonClick(string groupName, string name, PGameObject obj)
 {
     loadScene(name);
 }
Beispiel #7
0
 public PGameObject addChild(PGameObject obj)
 {
     if (obj) { obj.transform.parent = transform; }
     return obj;
 }