public GameObject defaultPanel; // for visuals - the default panel at the back public BoardPanel(PanelDefinition newDefinition, int strength, Board myMaster) { master = myMaster; // set the master script // set the type - DO NOT USE setType() as we do not want to initPanels()~! pnd = newDefinition; durability = strength; }
public void setType(PanelDefinition newDefinition, int strength) { if (pnd != null) { onPanelDestroy(); // the destroy call if there is a panel type } pnd = newDefinition; durability = strength; initPanels(); }