示例#1
0
    public void OnClickSubmitButton()
    {
        GameObject     atomTarget             = periodicTableControllerScript.GetAtomTarget();
        GameObject     elementPrefabInitiated = periodicTableControllerScript.getElementPrefabInitiated();
        GameObject     newAtom = Instantiate(elementPrefabInitiated, atomTarget.transform.position, Quaternion.identity) as GameObject;
        AtomController newAtomControllerScript = newAtom.GetComponent <AtomController>();

        newAtomControllerScript.DestroyElectron();
        newAtomControllerScript.canSpin = false;
        newAtom.transform.parent        = periodicTableControllerScript.mainEditMolecule.transform;
        newAtom.name = elementPrefabInitiated.name;
        Destroy(atomTarget);
        periodicTableControllerScript.ClosePeriodicTable();
        periodicTableControllerScript.TurnOnOnClickAllAtom();
    }
 public void OnClickDeleteButton()
 {
     Destroy(periodicTableControllerScript.GetAtomTarget());
     periodicTableControllerScript.ClosePeriodicTable();
     periodicTableControllerScript.TurnOnOnClickAllAtom();
 }