-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from Dgzt/editor-plugin-system
Editor plugin system
- Loading branch information
Showing
83 changed files
with
1,089 additions
and
804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apply plugin: "java" | ||
apply plugin: "maven-publish" | ||
|
||
group = 'com.github.jamestkhan.mundus' | ||
version = '0.5.1' | ||
|
||
sourceCompatibility = 1.7 | ||
targetCompatibility = 1.7 | ||
|
||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' | ||
sourceSets.main.java.srcDirs = ["src/"] | ||
sourceSets.main.resources.srcDirs = ["src/"] | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
duplicatesStrategy(DuplicatesStrategy.EXCLUDE) | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId project.group | ||
artifactId project.name | ||
version project.version | ||
from components.java | ||
artifact sourcesJar | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
editor-commons/src/com/mbrlabs/mundus/editorcommons/Subscribe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2024. See AUTHORS file. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.mbrlabs.mundus.editorcommons; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
|
||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface Subscribe { | ||
} |
44 changes: 44 additions & 0 deletions
44
editor-commons/src/com/mbrlabs/mundus/editorcommons/events/GameObjectModifiedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2024. See AUTHORS file. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.mbrlabs.mundus.editorcommons.events; | ||
|
||
import com.mbrlabs.mundus.commons.scene3d.GameObject; | ||
import com.mbrlabs.mundus.editorcommons.EventListener; | ||
import com.mbrlabs.mundus.editorcommons.Subscribe; | ||
|
||
public class GameObjectModifiedEvent { | ||
|
||
private GameObject gameObject; | ||
|
||
public GameObjectModifiedEvent(final GameObject gameObject) { | ||
this.gameObject = gameObject; | ||
} | ||
|
||
public GameObject getGameObject() { | ||
return gameObject; | ||
} | ||
|
||
public void setGameObject(GameObject gameObject) { | ||
this.gameObject = gameObject; | ||
} | ||
|
||
public interface GameObjectModifiedListener extends EventListener { | ||
|
||
@Subscribe | ||
void onGameObjectModified(GameObjectModifiedEvent event); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
editor-commons/src/com/mbrlabs/mundus/editorcommons/events/TerrainAddedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2024. See AUTHORS file. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.mbrlabs.mundus.editorcommons.events; | ||
|
||
import com.mbrlabs.mundus.commons.scene3d.components.TerrainComponent; | ||
import com.mbrlabs.mundus.editorcommons.EventListener; | ||
import com.mbrlabs.mundus.editorcommons.Subscribe; | ||
|
||
public class TerrainAddedEvent { | ||
|
||
private final TerrainComponent terrainComponent; | ||
|
||
public TerrainAddedEvent(TerrainComponent terrainComponent) { | ||
this.terrainComponent = terrainComponent; | ||
} | ||
|
||
public TerrainComponent getTerrainComponent() { | ||
return terrainComponent; | ||
} | ||
|
||
public interface TerrainAddedEventListener extends EventListener { | ||
|
||
@Subscribe | ||
void onTerrainAdded(TerrainAddedEvent event); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
editor-commons/src/com/mbrlabs/mundus/editorcommons/events/TerrainRemovedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (c) 2024. See AUTHORS file. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.mbrlabs.mundus.editorcommons.events; | ||
|
||
import com.mbrlabs.mundus.commons.scene3d.components.TerrainComponent; | ||
import com.mbrlabs.mundus.editorcommons.EventListener; | ||
import com.mbrlabs.mundus.editorcommons.Subscribe; | ||
|
||
public class TerrainRemovedEvent { | ||
|
||
private final TerrainComponent terrainComponent; | ||
|
||
public TerrainRemovedEvent(TerrainComponent terrainComponent) { | ||
this.terrainComponent = terrainComponent; | ||
} | ||
|
||
public TerrainComponent getTerrainComponent() { | ||
return terrainComponent; | ||
} | ||
|
||
public interface TerrainRemovedEventListener extends EventListener { | ||
|
||
@Subscribe | ||
void onTerrainRemoved(TerrainRemovedEvent event); | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
editor-commons/src/com/mbrlabs/mundus/editorcommons/events/TerrainVerticesChangedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2023. See AUTHORS file. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.mbrlabs.mundus.editorcommons.events; | ||
|
||
import com.mbrlabs.mundus.commons.scene3d.components.TerrainComponent; | ||
import com.mbrlabs.mundus.editorcommons.EventListener; | ||
import com.mbrlabs.mundus.editorcommons.Subscribe; | ||
|
||
public class TerrainVerticesChangedEvent { | ||
|
||
private final TerrainComponent terrainComponent; | ||
|
||
public TerrainVerticesChangedEvent(TerrainComponent terrainComponent) { | ||
this.terrainComponent = terrainComponent; | ||
} | ||
|
||
public TerrainComponent getTerrainComponent() { | ||
return terrainComponent; | ||
} | ||
|
||
public interface TerrainVerticesChangedEventListener extends EventListener { | ||
|
||
@Subscribe | ||
void onTerrainVerticesChanged(TerrainVerticesChangedEvent event); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.