public void AddResult(string text, float amount)
    {
        InformationResult result = informationPrefab.GetInstance(transform).GetComponent <InformationResult>();

        result.Init();
        result.people.text = text;
        result.amount.text = amount.ToString();
        result.amount.textComponent.text = result.amount.text; //Wouldn't show properly unless i did this
    }
Example #2
0
    private void MakeButton(Person otherPerson = null)
    {
        var btn = btnPrefab.GetInstance(transform).GetComponent <InterpayInstantiatorButton>();

        btn.Init();
        string buttonLabel;
        string columnLabel;

        GetLabels(out buttonLabel, out columnLabel, otherPerson);
        btn.buttonText.text = buttonLabel;
        btn.thisButton.onClick.AddListener(
            () =>
        {
            OnClick(columnLabel, otherPerson);
            Off();
        });
    }
Example #3
0
 public override void Launch(Vector2 toPoint)
 {
     target = targetPrefab.GetInstance();
     target.transform.position = toPoint;
     base.Launch(toPoint);
 }