private void Awake() { panel = GetComponentInParent <KeyPanel>(); button = GetComponent <Button>(); button.onClick.AddListener(() => panel.OnKeyPressed(keyValue)); }
private void loadIn() { pianoBackground = global::Project.Properties.Resources.pianoBackground; topBarBackground = global::Project.Properties.Resources.topBar; recordPic_hover = global::Project.Properties.Resources.recordPic_hover; recordPic_normal = global::Project.Properties.Resources.recordPic_normal; recordPic_on = global::Project.Properties.Resources.recordPic_on; KeyPanel.loadIn(); }
public void UpdateAnswerKey(KeyPanel pid) { if (pid.AnswerImage != null) { imageManager.Add(Workspace.IMGMGR_ANSWERS, pid.AnswerImagePath); myAnswerkeyPath = pid.AnswerImagePath; } ProcessOmrDocumentsOperation podo = new ProcessOmrDocumentsOperation(pid.AnswerImage, template, this.imageManager, null); podo.Start(); this.answers = podo.Answers; ReprocessVerification(VerificationParameters.AllParameters, answers, results); }
void Awake() { //base.Awake (); healthBar = GetComponentInChildren <HealthBar> (); if (!healthBar) { Debug.LogWarning("HealthBar not found in GUI"); } keyPanel = GetComponentInChildren <KeyPanel> (); if (!keyPanel) { Debug.LogWarning("KeyPanel not found in GUI"); } commandBar = GetComponentInChildren <CommandBar> (); if (!keyPanel) { Debug.LogWarning("CommandBar not found in GUI"); } GetComponent <Canvas> ().worldCamera = GameObject.FindWithTag("MainCamera").GetComponent <Camera> (); healthBar.SetHealth(GameObject.FindGameObjectWithTag("Player").GetComponent <Health> ()); }
public Workspace(InputPanel ip, KeyPanel kp, ITemplateForm currentTemplate) : this() { for (int i = 0; i < ip.SelectedInputs.Count; i++) { string guid = Guid.NewGuid().ToString(); imageManager.Add(guid, ip.SelectedInputs[i]); myImages.Add(guid, ip.SelectedInputs[i]); } if (kp.AnswerImage != null) { imageManager.Add(Workspace.IMGMGR_ANSWERS, kp.AnswerImagePath); myAnswerkeyPath = kp.AnswerImagePath; } omrProcessor = new ProcessOmrDocumentsOperation(kp.AnswerImage, currentTemplate, imageManager, myImages); this.PassingGrade = kp.PassingGrade; this.verificationParameters = VerificationParameters.GetTemplate(VerificationParameters.FilterTemplate.CommonIssues); }
public override void Init(params object[] args) { base.Init(args); layer = PanelLayer.Panel; instance = this; }