コード例 #1
0
ファイル: Bush.cs プロジェクト: spectraldani/WholesomeJam20
    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;
        }
    }
コード例 #2
0
 public override void OnInspectorGUI()
 {
     state = (PlatformHeight)EditorGUILayout.EnumPopup("Platform height", state);
     bush.ChangeBranchLength(state);
 }