Exemplo n.º 1
0
    public void ChangeBranchLength(PlatformHeight height)
    {
        switch (height)
        {
        case PlatformHeight.Short:
            SpriteRenderer.sprite = shortSprite;
            break;

        case PlatformHeight.Medium:
            SpriteRenderer.sprite = mediumSprite;
            break;

        case PlatformHeight.Long:
            SpriteRenderer.sprite = longSprite;
            break;
        }
    }
Exemplo n.º 2
0
 public override void OnInspectorGUI()
 {
     state = (PlatformHeight)EditorGUILayout.EnumPopup("Platform height", state);
     bush.ChangeBranchLength(state);
 }