示例#1
0
 public void resetSelectedElement()
 {
     selectedGameObj = null;
     selectedElement = null;
     if (puzzle.isSolved)
     {
         updateCodeText();
     }
 }
示例#2
0
 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);
    }
示例#4
0
 private void Awake()
 {
     this.element    = ElementStoneFactory.Instance.createElementStone(programmingElementType);
     this.hasGravity = GetComponent <Rigidbody>().useGravity;
 }