public void Reset(Vector3 position, string value, TextKind kind)
    {
        switch (kind)
        {
        case TextKind.Neutral:
        case TextKind.Positive:
            positive.text = value;
            negative.gameObject.SetActive(false);
            break;

        case TextKind.Negative:
            negative.text = value;
            positive.gameObject.SetActive(false);
            break;
        }

        transform.position = new Vector3(position.x, position.y, transform.position.z);
    }
Beispiel #2
0
    public void PopFloatingText(Vector3 position, string value, TextKind kind)
    {
        FloatingText newFloatingText = Instantiate(floatingTextPrefab, aboveAllCanvas.transform);

        newFloatingText.Reset(position, value, kind);
    }
 internal static IPropertyDescriptor <TModel, string, TViewModel> TextKind <TModel, TViewModel>
     (IPropertyDescriptor <TModel, string, TViewModel> descriptor, TextKind kind)
     where TModel : Model where TViewModel : ViewModel <TModel>
 {
     return(descriptor.SetCustomConfigurationValue(GetGuid(), kind));
 }