public override void OnInspectorGUI() { // draw the default inspector configurations base.OnInspectorGUI(); // cast the target script into a usable object Fillable myFillable = (Fillable)target; // add a slider for the blackLevel myFillable.currentFillAmount = EditorGUILayout.Slider(myFillable.currentFillAmount, 0, myFillable.maxFillAmount, null); }
private void Awake() { switch (unitType) { case FILLABLE.BOSS: bossHp = this; gameObject.SetActive(false); break; case FILLABLE.PLAYER: if (type == TYPE.HEALTH) { playerHp = this; } else { playerMp = this; } break; } }