public void resetSelectedElement() { selectedGameObj = null; selectedElement = null; if (puzzle.isSolved) { updateCodeText(); } }
public void registerSelectedElement(DragObject obj) { selectedGameObj = obj; selectedElement = obj.element; if (puzzle.isSolved) { updateCodeText(selectedElement.id); } }
public ElementStone createElementStone(string type) { programmingElement elem = getProgrammingElementByString(type); ElementStone es; if (elem == programmingElement.elemVar) { es = new VariableStone(); } else if (elem == programmingElement.elemInterval) { es = new IntervalStone(); } else { es = new ElementStone(elem); } return(es); }
private void Awake() { this.element = ElementStoneFactory.Instance.createElementStone(programmingElementType); this.hasGravity = GetComponent <Rigidbody>().useGravity; }