Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
the_dungeon_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
7b72c26d
Commit
7b72c26d
authored
Dec 31, 2015
by
Arnaud Guerquin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start split Server/Client event
parent
f3c25cb0
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
27 additions
and
44 deletions
+27
-44
src/core/event/AbilityEvent.java
src/core/event/AbilityEvent.java
+1
-1
src/core/event/ClientEvent.java
src/core/event/ClientEvent.java
+10
-0
src/core/event/CreationEvent.java
src/core/event/CreationEvent.java
+1
-1
src/core/event/DeathEvent.java
src/core/event/DeathEvent.java
+1
-1
src/core/event/EmptyEvent.java
src/core/event/EmptyEvent.java
+1
-1
src/core/event/Event.java
src/core/event/Event.java
+0
-11
src/core/event/FailedEvent.java
src/core/event/FailedEvent.java
+1
-1
src/core/event/MapInit.java
src/core/event/MapInit.java
+1
-1
src/core/event/MoveEvent.java
src/core/event/MoveEvent.java
+1
-1
src/core/event/ServerEvent.java
src/core/event/ServerEvent.java
+10
-0
src/core/event/StairsEvent.java
src/core/event/StairsEvent.java
+0
-26
No files found.
src/core/event/AbilityEvent.java
View file @
7b72c26d
...
...
@@ -12,7 +12,7 @@ import java.util.List;
/**
* Created by dupriez on 19/12/15.
*/
public
class
AbilityEvent
implements
core
.
event
.
Event
{
public
class
AbilityEvent
implements
ClientEvent
,
Server
Event
{
private
static
final
long
serialVersionUID
=
1L
;
private
int
potentialCasterCharacterID
;
...
...
src/core/event/ClientEvent.java
0 → 100644
View file @
7b72c26d
package
core.event
;
/**
* Only used to add some security between event. Those event can be sent by the server to the client.
* @author Guerquin Arnaud
*
*/
public
interface
ClientEvent
extends
Event
{
}
src/core/event/CreationEvent.java
View file @
7b72c26d
...
...
@@ -8,7 +8,7 @@ import core.gamestate.GameContent;
* @author Guerquin Arnaud
*
*/
public
class
CreationEvent
implements
Event
{
public
class
CreationEvent
implements
Client
Event
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
src/core/event/DeathEvent.java
View file @
7b72c26d
...
...
@@ -7,7 +7,7 @@ import core.gamestate.GameContent;
* @author Guerquin Arnaud
*
*/
public
class
DeathEvent
implements
Event
{
public
class
DeathEvent
implements
Client
Event
{
private
static
final
long
serialVersionUID
=
1L
;
@Override
...
...
src/core/event/EmptyEvent.java
View file @
7b72c26d
...
...
@@ -8,7 +8,7 @@ import core.gamestate.GameContent;
* @author Guerquin Arnaud
*
*/
public
class
EmptyEvent
implements
Event
{
public
class
EmptyEvent
implements
ClientEvent
,
Server
Event
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
EmptyEvent
empty
=
new
EmptyEvent
();
...
...
src/core/event/Event.java
View file @
7b72c26d
...
...
@@ -15,17 +15,6 @@ public interface Event extends NetworkObject{
static
final
long
serialVersionUID
=
1L
;
public
static
final
int
infinity
=
-
1
;
/**
* Give a modified version of the first event using the second.
* @param event the event applied to this. Can't be null.
* @return true if a modification happened.
*/
public
default
boolean
alter
(
Event
event
){
return
false
;
}
boolean
execute
(
GameContent
gameContent
);
Event
resolve
(
GameContent
gameContent
);
...
...
src/core/event/FailedEvent.java
View file @
7b72c26d
...
...
@@ -8,7 +8,7 @@ import core.gamestate.GameContent;
* @author Guerquin Arnaud
*
*/
public
class
FailedEvent
implements
Event
{
public
class
FailedEvent
implements
ClientEvent
,
Server
Event
{
private
static
final
long
serialVersionUID
=
1L
;
static
final
public
Event
failed
=
new
FailedEvent
();
...
...
src/core/event/MapInit.java
View file @
7b72c26d
...
...
@@ -11,7 +11,7 @@ import gameloop.DummyLocalGameLoop;
* An Event that changes the map and the gameState
*
*/
public
class
MapInit
implements
Event
{
public
class
MapInit
implements
Client
Event
{
private
static
final
long
serialVersionUID
=
1L
;
private
GameContent
gameContent
;
...
...
src/core/event/MoveEvent.java
View file @
7b72c26d
...
...
@@ -12,7 +12,7 @@ import core.zone.Translation;
* @author Guerquin Arnaud
*
*/
public
class
MoveEvent
implements
Event
{
public
class
MoveEvent
implements
ClientEvent
,
Server
Event
{
private
static
final
long
serialVersionUID
=
1L
;
private
int
targetID
;
...
...
src/core/event/ServerEvent.java
0 → 100644
View file @
7b72c26d
package
core.event
;
/**
* Only used to add some security between event. Those event can be sent by the client to the server.
* @author Guerquin Arnaud
*
*/
public
interface
ServerEvent
extends
Event
{
}
src/core/event/StairsEvent.java
deleted
100644 → 0
View file @
f3c25cb0
package
core.event
;
import
core.gamestate.GameContent
;
import
gameloop.GameStarter
;
//created by Theodore LOPEZ just for tests on stairs
public
class
StairsEvent
implements
Event
{
private
static
final
long
serialVersionUID
=
1L
;
public
StairsEvent
(){
}
@Override
public
boolean
execute
(
GameContent
gameContent
)
{
GameStarter
.
leaveGame
();
return
true
;
}
@Override
public
Event
resolve
(
GameContent
gameContent
)
{
return
this
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment