-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
60 additions
and
37 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
src/main/java/uk/oczadly/karl/csgsi/state/components/grenade/BasicGrenade.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,42 @@ | ||
package uk.oczadly.karl.csgsi.state.components.grenade; | ||
|
||
import com.google.gson.annotations.Expose; | ||
import uk.oczadly.karl.csgsi.state.components.Coordinate; | ||
import uk.oczadly.karl.csgsi.state.components.EnumValue; | ||
import uk.oczadly.karl.csgsi.state.components.PlayerSteamID; | ||
|
||
/** | ||
* Represents a standard grenade. | ||
*/ | ||
public class BasicGrenade implements Grenade { | ||
|
||
@Expose private EnumValue<Type> type; | ||
@Expose private PlayerSteamID owner; | ||
@Expose private double lifetime; | ||
|
||
|
||
@Override | ||
public final EnumValue<Type> getType() { | ||
return type; | ||
} | ||
|
||
@Override | ||
public final PlayerSteamID getOwner() { | ||
return owner; | ||
} | ||
|
||
@Override | ||
public final double getLifetime() { | ||
return lifetime; | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
return getClass().getSimpleName() + "{" + | ||
"type=" + type + | ||
", owner=" + owner + | ||
", lifetime=" + lifetime + '}'; | ||
} | ||
|
||
} |
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
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