public PGameObject addChild(PGameObject obj) { if (obj) { obj.transform.parent = transform; } return(obj); }
void Start() { PGameObject obj = gameObject.GetComponent <PGameObject>(); if (obj) { depth = obj.graphics.sceneDepthStep * 0.5f; } }
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; } } }
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(); }
protected virtual void buttonClick(string groupName, string name, PGameObject obj) { }
protected override void buttonClick(string groupName, string name, PGameObject obj) { loadScene(name); }
public PGameObject addChild(PGameObject obj) { if (obj) { obj.transform.parent = transform; } return obj; }