private void CreateButton(State state) { GameObject buttonGameObject = Instantiate(prefab); GameButton button = buttonGameObject.GetComponent <GameButton>(); gameButtons.Add(button); button.RestoreWith(state); }
public override bool Equals(object other) { if (this == other) { return(true); } if (other == null) { return(false); } if (!(other is GameButton)) { return(false); } GameButton gameButton = (GameButton)other; return(nameLabel.Equals(gameButton.nameLabel) && levelLabel.Equals(gameButton.levelLabel) && dateTimeLabel.Equals(gameButton.dateTimeLabel)); }
public void Remove(GameButton gameButton) { gameButton.DeleteLinkedFile(); gameButtons.Remove(gameButton); Destroy(gameButton.gameObject); }