Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
f211d8fa
Commit
f211d8fa
authored
Jan 06, 2016
by
Mathieu Hilaire
Browse files
gold.jpg linked to the species gold as its sprite
parent
8ec70a0b
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/assets/gold.png
0 → 100644
View file @
f211d8fa
237 KB
src/assets/species/species.txt
View file @
f211d8fa
...
...
@@ -327,7 +327,7 @@ R
200
200
#entityDisplayerType
FIREB
OL
T
G
OL
D
#triggers
1
#trigger function
...
...
src/graphics/guiSkeleton/entityDisplayer/EntityDisplayerProvider.java
View file @
f211d8fa
...
...
@@ -316,6 +316,40 @@ public class EntityDisplayerProvider {
}
return
new
EntityDisplayer
(
associatedEntity
,
animationMapTab
,
'C'
);
}
case
GOLD
:
{
Map
<
Action
,
Animation
>[]
animationMapTab
=
new
Map
[
Direction
.
values
().
length
]
;
animationMapTab
[
Direction
.
RIGHT
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();
animationMapTab
[
Direction
.
RIGHTUP
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();
animationMapTab
[
Direction
.
UP
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();
animationMapTab
[
Direction
.
LEFTUP
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();;
animationMapTab
[
Direction
.
LEFT
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();
animationMapTab
[
Direction
.
LEFTDOWN
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();;
animationMapTab
[
Direction
.
DOWN
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();
animationMapTab
[
Direction
.
RIGHTDOWN
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();
Sprite
gold
=
SpriteStorage
.
getInstance
().
getGold
();
for
(
Action
action
:
Action
.
values
())
{
Sprite
persoR
=
new
Sprite
(
gold
.
getSpriteImage
(),
0
,
0
,
64
,
32
);
Animation
persoAnimationRIGHT
=
new
Animation
(
persoR
,
2
,
frameDelay
);
animationMapTab
[
Direction
.
RIGHT
.
ordinal
()].
put
(
action
,
persoAnimationRIGHT
);
animationMapTab
[
Direction
.
RIGHTUP
.
ordinal
()].
put
(
action
,
persoAnimationRIGHT
);
Sprite
persoU
=
new
Sprite
(
gold
.
getSpriteImage
(),
0
,
32
,
64
,
32
);
Animation
persoAnimationUP
=
new
Animation
(
persoU
,
2
,
frameDelay
);
animationMapTab
[
Direction
.
UP
.
ordinal
()].
put
(
action
,
persoAnimationUP
);
animationMapTab
[
Direction
.
LEFTUP
.
ordinal
()].
put
(
action
,
persoAnimationUP
);
Sprite
persoL
=
new
Sprite
(
gold
.
getSpriteImage
(),
0
,
64
,
64
,
32
);
Animation
persoAnimationLEFT
=
new
Animation
(
persoL
,
2
,
frameDelay
);
animationMapTab
[
Direction
.
LEFT
.
ordinal
()].
put
(
action
,
persoAnimationLEFT
);
animationMapTab
[
Direction
.
LEFTDOWN
.
ordinal
()].
put
(
action
,
persoAnimationLEFT
);
Sprite
persoroseD
=
new
Sprite
(
gold
.
getSpriteImage
(),
0
,
96
,
64
,
32
);
Animation
persoAnimationDOWN
=
new
Animation
(
persoroseD
,
2
,
frameDelay
);
animationMapTab
[
Direction
.
DOWN
.
ordinal
()].
put
(
action
,
persoAnimationDOWN
);
animationMapTab
[
Direction
.
RIGHTDOWN
.
ordinal
()].
put
(
action
,
persoAnimationDOWN
);
}
return
new
EntityDisplayer
(
associatedEntity
,
animationMapTab
,
'C'
);
}
default
:
{
Map
<
Action
,
Animation
>[]
animationMapTab
=
new
Map
[
Direction
.
values
().
length
]
;
animationMapTab
[
Direction
.
RIGHT
.
ordinal
()]
=
new
HashMap
<
Action
,
Animation
>();
...
...
src/graphics/guiSkeleton/entityDisplayer/EntityDisplayerType.java
View file @
f211d8fa
...
...
@@ -13,5 +13,6 @@ public enum EntityDisplayerType {
PONYTA
,
DIAGLA
,
FIREBOLT
,
FROSTBOLT
FROSTBOLT
,
GOLD
}
src/graphics/guiSkeleton/sprites/SpriteStorage.java
View file @
f211d8fa
...
...
@@ -28,6 +28,7 @@ public class SpriteStorage {
diagla
=
new
Sprite
(
ImageIO
.
read
(
UsedForLoadingSprites
.
getInstance
().
getClass
().
getResource
(
"diagla.png"
)));
firebolt
=
new
Sprite
(
ImageIO
.
read
(
UsedForLoadingSprites
.
getInstance
().
getClass
().
getResource
(
"firebolt.png"
)));
frostbolt
=
new
Sprite
(
ImageIO
.
read
(
UsedForLoadingSprites
.
getInstance
().
getClass
().
getResource
(
"frostbolt.png"
)));
gold
=
new
Sprite
(
ImageIO
.
read
(
UsedForLoadingSprites
.
getInstance
().
getClass
().
getResource
(
"gold.png"
)));
}
catch
(
IOException
e
)
{
...
...
@@ -44,6 +45,7 @@ public class SpriteStorage {
private
Sprite
diagla
;
private
Sprite
firebolt
;
private
Sprite
frostbolt
;
private
Sprite
gold
;
public
Sprite
getHealthBar1Container
()
{
return
healthBar1Container
;
...
...
@@ -77,5 +79,7 @@ public class SpriteStorage {
}
public
Sprite
getFrostbolt
(){
return
frostbolt
;
}
}
public
Sprite
getGold
(){
return
gold
;
}
}
Write
Preview
Supports
Markdown
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