Exemplo n.º 1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        Killable killable = (Killable)target;

        if (Application.isPlaying)
        {
            if (GUILayout.Button("Kill"))
            {
                killable.Kill();
            }
            if (GUILayout.Button("¨Destroy"))
            {
                killable.Destroy();
            }
            if (GUILayout.Button("Resurrect"))
            {
                killable.Resurrect();
            }
        }
    }