-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Entity based rooms and stubbed room hints
- Loading branch information
Showing
22 changed files
with
2,725 additions
and
2,243 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
96 changes: 52 additions & 44 deletions
96
src/toniarts/openkeeper/game/component/RoomComponent.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 |
---|---|---|
@@ -1,44 +1,52 @@ | ||
/* | ||
* Copyright (C) 2014-2021 OpenKeeper | ||
* | ||
* OpenKeeper is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* OpenKeeper is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OpenKeeper. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package toniarts.openkeeper.game.component; | ||
|
||
import com.simsilica.es.EntityComponent; | ||
|
||
/** | ||
* A base room component. This entity is a room | ||
* | ||
* @author Toni Helenius <helenius.toni@gmail.com> | ||
*/ | ||
public class RoomComponent implements EntityComponent { | ||
|
||
public short roomId; | ||
public boolean destroyed = false; | ||
|
||
public RoomComponent() { | ||
// For serialization | ||
} | ||
|
||
public RoomComponent(short roomId) { | ||
this.roomId = roomId; | ||
} | ||
|
||
public RoomComponent(short roomId, boolean destroyed) { | ||
this.roomId = roomId; | ||
this.destroyed = destroyed; | ||
} | ||
|
||
} | ||
/* | ||
* Copyright (C) 2014-2021 OpenKeeper | ||
* | ||
* OpenKeeper is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* OpenKeeper is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OpenKeeper. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package toniarts.openkeeper.game.component; | ||
|
||
import com.simsilica.es.EntityComponent; | ||
import java.awt.Point; | ||
|
||
/** | ||
* A base room component. This entity is a room | ||
* | ||
* @author Toni Helenius <helenius.toni@gmail.com> | ||
*/ | ||
public class RoomComponent implements EntityComponent { | ||
|
||
public short roomId; | ||
public boolean destroyed = false; | ||
|
||
/** | ||
* Room center, for convenience | ||
*/ | ||
public Point location; | ||
|
||
public RoomComponent() { | ||
// For serialization | ||
} | ||
|
||
public RoomComponent(RoomComponent roomComponent) { | ||
roomId = roomComponent.roomId; | ||
destroyed = roomComponent.destroyed; | ||
location = roomComponent.location; | ||
} | ||
|
||
public RoomComponent(short roomId, boolean destroyed, Point location) { | ||
this.roomId = roomId; | ||
this.destroyed = destroyed; | ||
} | ||
|
||
} |
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.