예제 #1
0
        private void AllPathUI()
        {
            if (!eTarget)
            {
                return;
            }

            for (int i = 0; i < eTarget.Paths.Count; i++)
            {
                UF_PathModeSelector _p          = eTarget.Paths[i];
                UF_PathMode         _pathMethod = _p.Mode;
                EditoolsLayout.Foldout(ref _pathMethod.ShowPath, $"Show/Hide {_pathMethod.Id}", true);

                if (!_pathMethod.ShowPath)
                {
                    continue;
                }

                EditoolsBox.HelpBox($"[{i}] {_pathMethod.Id} -> {_pathMethod.PathPoints.Count} total points");

                EditoolsLayout.Horizontal(true);
                EditoolsButton.ButtonWithConfirm("Remove This Path", Color.red, eTarget.RemovePath, i,
                                                 $"Suppress Path {i + 1} ? ", "Are your sure ?");

                UF_PathModeSelector _mode = _p;
                _mode.Type = (UF_PathType)EditoolsField.EnumPopup("Mode Type", _mode.Type);
                EditoolsLayout.Horizontal(false);

                _mode.Mode.DrawSettings();

                EditoolsLayout.Space(5);
            }
        }
    void DrawSpawnModeUI(SM_SpawnPoint _point)
    {
        EditoolsLayout.Horizontal(true);
        EditoolsBox.HelpBoxInfo("Add Spawn Mode");

        EditoolsLayout.Vertical(true);
        EditoolsButton.Button("+", Color.green, _point.AddMode);
        EditoolsButton.ButtonWithConfirm("#", Color.red, _point.ClearModes, "Remove All ?", "Remove All Mode ?", _showCondition: _point.SpawnModes.Count > 0);
        EditoolsLayout.Vertical(false);

        EditoolsLayout.Horizontal(false);
        for (int i = 0; i < _point.SpawnModes.Count; i++)
        {
            SM_SpawnMode _mode = _point.SpawnModes[i];

            EditoolsLayout.Horizontal(true);
            _mode.Type = (SM_SpawnType)EditoolsField.EnumPopup("Mode Type", _mode.Type);
            EditoolsButton.ButtonWithConfirm("X", Color.red, _point.RemoveMode, i, "Remove Mode ?", "Remove This Mode ?");
            EditoolsLayout.Horizontal(false);
            DrawModeSettingsUI(_mode);
        }
    }