public override void OnInspectorGUI() { RowButton myTarget = (RowButton)target; myTarget.pressedButton = (Button)EditorGUILayout.ObjectField("Initial pressed button", myTarget.pressedButton, typeof(Button)); myTarget.targetGameObjectPosition = (GameObject)EditorGUILayout.ObjectField("Target panel", myTarget.targetGameObjectPosition, typeof(GameObject)); serializedObject.Update(); EditorGUILayout.PropertyField(serializedObject.FindProperty("ConfigList"), true); serializedObject.ApplyModifiedProperties(); }
public void Dispose() { RowTextBoxPath.Controls.Clear(); RowTextBoxName.Controls.Clear(); RowCheckBox.Controls.Clear(); RowButton.Controls.Clear(); RowTextBoxPath.Dispose(); RowTextBoxName.Dispose(); RowCheckBox.Dispose(); RowButton.Dispose(); }
public bool RandomlyPickStuff() { int randObj = Random.Range(0, m_rowButtons.Count); GameObject obj = m_rowButtons[randObj]; RowButton rb = obj.GetComponent <RowButton>(); while (rb.rowPieces.Count == 0 && GetComponent <UI>().win == false) { randObj = Random.Range(0, m_rowButtons.Count); obj = m_rowButtons[randObj]; rb = obj.GetComponent <RowButton>(); } int rand = Random.Range(1, rb.rowPieces.Count); for (int i = 0; i < rand; i++) { rb.OnClick(); } m_endTurnButton.GetComponent <EndTurn>().FinishTurn(); GetComponent <RowButtonMaster>().ResetButtons(); return(false); }
void OnEnable() { RowButton myTarget = (RowButton)target; previousSize = 0; }