Merge branch 'DevelopmentX' into GUITextures
This commit is contained in:
commit
4f5270ba9b
26 changed files with 3028 additions and 437 deletions
|
@ -80,6 +80,12 @@
|
||||||
/processorParam:Quality=Best
|
/processorParam:Quality=Best
|
||||||
/build:sounds/Craft sound.wav
|
/build:sounds/Craft sound.wav
|
||||||
|
|
||||||
|
#begin sounds/gun-gunshot-01.wav
|
||||||
|
/importer:WavImporter
|
||||||
|
/processor:SoundEffectProcessor
|
||||||
|
/processorParam:Quality=Best
|
||||||
|
/build:sounds/gun-gunshot-01.wav
|
||||||
|
|
||||||
#begin sounds/Loot.wav
|
#begin sounds/Loot.wav
|
||||||
/importer:WavImporter
|
/importer:WavImporter
|
||||||
/processor:SoundEffectProcessor
|
/processor:SoundEffectProcessor
|
||||||
|
@ -212,57 +218,84 @@
|
||||||
#begin Textures/Animations/player_left_idle.animation
|
#begin Textures/Animations/player_left_idle.animation
|
||||||
/copy:Textures/Animations/player_left_idle.animation
|
/copy:Textures/Animations/player_left_idle.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_down_weapon.animation
|
|
||||||
/copy:Textures/Animations/player_look_down_weapon.animation
|
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_down.animation
|
#begin Textures/Animations/player_look_down.animation
|
||||||
/copy:Textures/Animations/player_look_down.animation
|
/copy:Textures/Animations/player_look_down.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_left_down_weapon.animation
|
#begin Textures/Animations/player_look_down_weapon.animation
|
||||||
/copy:Textures/Animations/player_look_left_down_weapon.animation
|
/copy:Textures/Animations/player_look_down_weapon.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_left_down.animation
|
|
||||||
/copy:Textures/Animations/player_look_left_down.animation
|
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_left_up_weapon.animation
|
|
||||||
/copy:Textures/Animations/player_look_left_up_weapon.animation
|
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_left_up.animation
|
|
||||||
/copy:Textures/Animations/player_look_left_up.animation
|
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_left_weapon.animation
|
|
||||||
/copy:Textures/Animations/player_look_left_weapon.animation
|
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_left.animation
|
#begin Textures/Animations/player_look_left.animation
|
||||||
/copy:Textures/Animations/player_look_left.animation
|
/copy:Textures/Animations/player_look_left.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_right_down_weapon.animation
|
#begin Textures/Animations/player_look_left_down.animation
|
||||||
/copy:Textures/Animations/player_look_right_down_weapon.animation
|
/copy:Textures/Animations/player_look_left_down.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_right_down.animation
|
#begin Textures/Animations/player_look_left_down_weapon.animation
|
||||||
/copy:Textures/Animations/player_look_right_down.animation
|
/copy:Textures/Animations/player_look_left_down_weapon.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_right_up_weapon.animation
|
#begin Textures/Animations/player_look_left_up.animation
|
||||||
/copy:Textures/Animations/player_look_right_up_weapon.animation
|
/copy:Textures/Animations/player_look_left_up.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_right_up.animation
|
#begin Textures/Animations/player_look_left_up_weapon.animation
|
||||||
/copy:Textures/Animations/player_look_right_up.animation
|
/copy:Textures/Animations/player_look_left_up_weapon.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_right_weapon.animation
|
#begin Textures/Animations/player_look_left_weapon.animation
|
||||||
/copy:Textures/Animations/player_look_right_weapon.animation
|
/copy:Textures/Animations/player_look_left_weapon.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_right.animation
|
#begin Textures/Animations/player_look_right.animation
|
||||||
/copy:Textures/Animations/player_look_right.animation
|
/copy:Textures/Animations/player_look_right.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_up_weapon.animation
|
#begin Textures/Animations/player_look_right_down.animation
|
||||||
/copy:Textures/Animations/player_look_up_weapon.animation
|
/copy:Textures/Animations/player_look_right_down.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_look_right_down_weapon.animation
|
||||||
|
/copy:Textures/Animations/player_look_right_down_weapon.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_look_right_up.animation
|
||||||
|
/copy:Textures/Animations/player_look_right_up.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_look_right_up_weapon.animation
|
||||||
|
/copy:Textures/Animations/player_look_right_up_weapon.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_look_right_weapon.animation
|
||||||
|
/copy:Textures/Animations/player_look_right_weapon.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_look_up.animation
|
#begin Textures/Animations/player_look_up.animation
|
||||||
/copy:Textures/Animations/player_look_up.animation
|
/copy:Textures/Animations/player_look_up.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_look_up_weapon.animation
|
||||||
|
/copy:Textures/Animations/player_look_up_weapon.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_right_idle.animation
|
#begin Textures/Animations/player_right_idle.animation
|
||||||
/copy:Textures/Animations/player_right_idle.animation
|
/copy:Textures/Animations/player_right_idle.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_down.animation
|
||||||
|
/copy:Textures/Animations/player_run_down.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_left.animation
|
||||||
|
/copy:Textures/Animations/player_run_left.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_left_down.animation
|
||||||
|
/copy:Textures/Animations/player_run_left_down.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_left_up.animation
|
||||||
|
/copy:Textures/Animations/player_run_left_up.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_right.animation
|
||||||
|
/copy:Textures/Animations/player_run_right.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_right.zip
|
||||||
|
/copy:Textures/Animations/player_run_right.zip
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_right_down.animation
|
||||||
|
/copy:Textures/Animations/player_run_right_down.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_right_up.animation
|
||||||
|
/copy:Textures/Animations/player_run_right_up.animation
|
||||||
|
|
||||||
|
#begin Textures/Animations/player_run_up.animation
|
||||||
|
/copy:Textures/Animations/player_run_up.animation
|
||||||
|
|
||||||
#begin Textures/Animations/player_running_top_rotate.animation
|
#begin Textures/Animations/player_running_top_rotate.animation
|
||||||
/copy:Textures/Animations/player_running_top_rotate.animation
|
/copy:Textures/Animations/player_running_top_rotate.animation
|
||||||
|
|
||||||
|
@ -299,18 +332,6 @@
|
||||||
#begin Textures/Animations/zombie_walk.animation
|
#begin Textures/Animations/zombie_walk.animation
|
||||||
/copy:Textures/Animations/zombie_walk.animation
|
/copy:Textures/Animations/zombie_walk.animation
|
||||||
|
|
||||||
#begin Textures/AnimationTextures/Character/hr-level1_idle_gun.png
|
|
||||||
/importer:TextureImporter
|
|
||||||
/processor:TextureProcessor
|
|
||||||
/processorParam:ColorKeyColor=255,0,255,255
|
|
||||||
/processorParam:ColorKeyEnabled=True
|
|
||||||
/processorParam:GenerateMipmaps=False
|
|
||||||
/processorParam:PremultiplyAlpha=True
|
|
||||||
/processorParam:ResizeToPowerOfTwo=False
|
|
||||||
/processorParam:MakeSquare=False
|
|
||||||
/processorParam:TextureFormat=Color
|
|
||||||
/build:Textures/AnimationTextures/Character/hr-level1_idle_gun.png
|
|
||||||
|
|
||||||
#begin Textures/AnimationTextures/Character/hr-level1_idle.png
|
#begin Textures/AnimationTextures/Character/hr-level1_idle.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -323,6 +344,18 @@
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/AnimationTextures/Character/hr-level1_idle.png
|
/build:Textures/AnimationTextures/Character/hr-level1_idle.png
|
||||||
|
|
||||||
|
#begin Textures/AnimationTextures/Character/hr-level1_idle_gun.png
|
||||||
|
/importer:TextureImporter
|
||||||
|
/processor:TextureProcessor
|
||||||
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
/processorParam:ColorKeyEnabled=True
|
||||||
|
/processorParam:GenerateMipmaps=False
|
||||||
|
/processorParam:PremultiplyAlpha=True
|
||||||
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
|
/processorParam:MakeSquare=False
|
||||||
|
/processorParam:TextureFormat=Color
|
||||||
|
/build:Textures/AnimationTextures/Character/hr-level1_idle_gun.png
|
||||||
|
|
||||||
#begin Textures/AnimationTextures/Character/hr-level1_mining_tool-1.png
|
#begin Textures/AnimationTextures/Character/hr-level1_mining_tool-1.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -347,18 +380,6 @@
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/AnimationTextures/Character/hr-level1_mining_tool-2.png
|
/build:Textures/AnimationTextures/Character/hr-level1_mining_tool-2.png
|
||||||
|
|
||||||
#begin Textures/AnimationTextures/Character/hr-level1_running_gun.png
|
|
||||||
/importer:TextureImporter
|
|
||||||
/processor:TextureProcessor
|
|
||||||
/processorParam:ColorKeyColor=255,0,255,255
|
|
||||||
/processorParam:ColorKeyEnabled=True
|
|
||||||
/processorParam:GenerateMipmaps=False
|
|
||||||
/processorParam:PremultiplyAlpha=True
|
|
||||||
/processorParam:ResizeToPowerOfTwo=False
|
|
||||||
/processorParam:MakeSquare=False
|
|
||||||
/processorParam:TextureFormat=Color
|
|
||||||
/build:Textures/AnimationTextures/Character/hr-level1_running_gun.png
|
|
||||||
|
|
||||||
#begin Textures/AnimationTextures/Character/hr-level1_running.png
|
#begin Textures/AnimationTextures/Character/hr-level1_running.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -371,6 +392,18 @@
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/AnimationTextures/Character/hr-level1_running.png
|
/build:Textures/AnimationTextures/Character/hr-level1_running.png
|
||||||
|
|
||||||
|
#begin Textures/AnimationTextures/Character/hr-level1_running_gun.png
|
||||||
|
/importer:TextureImporter
|
||||||
|
/processor:TextureProcessor
|
||||||
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
/processorParam:ColorKeyEnabled=True
|
||||||
|
/processorParam:GenerateMipmaps=False
|
||||||
|
/processorParam:PremultiplyAlpha=True
|
||||||
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
|
/processorParam:MakeSquare=False
|
||||||
|
/processorParam:TextureFormat=Color
|
||||||
|
/build:Textures/AnimationTextures/Character/hr-level1_running_gun.png
|
||||||
|
|
||||||
#begin Textures/AnimationTextures/unicorn.png
|
#begin Textures/AnimationTextures/unicorn.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -406,8 +439,9 @@
|
||||||
/processorParam:MakeSquare=False
|
/processorParam:MakeSquare=False
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/AnimationTextures/Zombie/zombie_spritesheet_v2.png
|
/build:Textures/AnimationTextures/Zombie/zombie_spritesheet_v2.png
|
||||||
|
|
||||||
|
|
||||||
#begin Textures/GUI/back.png
|
#begin Textures/Effects/explosion.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
/processorParam:ColorKeyColor=255,0,255,255
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
@ -417,7 +451,19 @@
|
||||||
/processorParam:ResizeToPowerOfTwo=False
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
/processorParam:MakeSquare=False
|
/processorParam:MakeSquare=False
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/GUI/back.png
|
/build:Textures/Effects/explosion.png
|
||||||
|
|
||||||
|
#begin Textures/GUI/back.png
|
||||||
|
/importer:TextureImporter
|
||||||
|
/processor:TextureProcessor
|
||||||
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
/processorParam:ColorKeyEnabled=True
|
||||||
|
/processorParam:GenerateMipmaps=False
|
||||||
|
/processorParam:PremultiplyAlpha=True
|
||||||
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
|
/processorParam:MakeSquare=False
|
||||||
|
/processorParam:TextureFormat=Color
|
||||||
|
/build:Textures/GUI/back.png
|
||||||
|
|
||||||
#begin Textures/GUI/background/base.png
|
#begin Textures/GUI/background/base.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
|
@ -526,7 +572,7 @@
|
||||||
/processorParam:MakeSquare=False
|
/processorParam:MakeSquare=False
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/GUI/Button2.png
|
/build:Textures/GUI/Button2.png
|
||||||
|
|
||||||
#begin Textures/GUI/ButtonI.png
|
#begin Textures/GUI/ButtonI.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -538,20 +584,8 @@
|
||||||
/processorParam:MakeSquare=False
|
/processorParam:MakeSquare=False
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/GUI/ButtonI.png
|
/build:Textures/GUI/ButtonI.png
|
||||||
|
|
||||||
#begin Textures/GUI/checkboxs_off-on.png
|
#begin Textures/GUI/checkboxs_off.png
|
||||||
/importer:TextureImporter
|
|
||||||
/processor:TextureProcessor
|
|
||||||
/processorParam:ColorKeyColor=255,0,255,255
|
|
||||||
/processorParam:ColorKeyEnabled=True
|
|
||||||
/processorParam:GenerateMipmaps=False
|
|
||||||
/processorParam:PremultiplyAlpha=True
|
|
||||||
/processorParam:ResizeToPowerOfTwo=False
|
|
||||||
/processorParam:MakeSquare=False
|
|
||||||
/processorParam:TextureFormat=Color
|
|
||||||
/build:Textures/GUI/checkboxs_off-on.png
|
|
||||||
|
|
||||||
#begin Textures/GUI/checkboxs_off.png
|
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
/processorParam:ColorKeyColor=255,0,255,255
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
@ -563,6 +597,18 @@
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/GUI/checkboxs_off.png
|
/build:Textures/GUI/checkboxs_off.png
|
||||||
|
|
||||||
|
#begin Textures/GUI/checkboxs_off-on.png
|
||||||
|
/importer:TextureImporter
|
||||||
|
/processor:TextureProcessor
|
||||||
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
/processorParam:ColorKeyEnabled=True
|
||||||
|
/processorParam:GenerateMipmaps=False
|
||||||
|
/processorParam:PremultiplyAlpha=True
|
||||||
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
|
/processorParam:MakeSquare=False
|
||||||
|
/processorParam:TextureFormat=Color
|
||||||
|
/build:Textures/GUI/checkboxs_off-on.png
|
||||||
|
|
||||||
#begin Textures/GUI/checkboxs_on.png
|
#begin Textures/GUI/checkboxs_on.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -599,18 +645,6 @@
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/GUI/mouse.png
|
/build:Textures/GUI/mouse.png
|
||||||
|
|
||||||
#begin Textures/GUI/Switch_backgrownd.png
|
|
||||||
/importer:TextureImporter
|
|
||||||
/processor:TextureProcessor
|
|
||||||
/processorParam:ColorKeyColor=255,0,255,255
|
|
||||||
/processorParam:ColorKeyEnabled=True
|
|
||||||
/processorParam:GenerateMipmaps=False
|
|
||||||
/processorParam:PremultiplyAlpha=True
|
|
||||||
/processorParam:ResizeToPowerOfTwo=False
|
|
||||||
/processorParam:MakeSquare=False
|
|
||||||
/processorParam:TextureFormat=Color
|
|
||||||
/build:Textures/GUI/Switch_backgrownd.png
|
|
||||||
|
|
||||||
#begin Textures/GUI/switch.png
|
#begin Textures/GUI/switch.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -623,6 +657,18 @@
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/GUI/switch.png
|
/build:Textures/GUI/switch.png
|
||||||
|
|
||||||
|
#begin Textures/GUI/Switch_backgrownd.png
|
||||||
|
/importer:TextureImporter
|
||||||
|
/processor:TextureProcessor
|
||||||
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
/processorParam:ColorKeyEnabled=True
|
||||||
|
/processorParam:GenerateMipmaps=False
|
||||||
|
/processorParam:PremultiplyAlpha=True
|
||||||
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
|
/processorParam:MakeSquare=False
|
||||||
|
/processorParam:TextureFormat=Color
|
||||||
|
/build:Textures/GUI/Switch_backgrownd.png
|
||||||
|
|
||||||
#begin Textures/icons/12.png
|
#begin Textures/icons/12.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
@ -827,6 +873,30 @@
|
||||||
/processorParam:TextureFormat=Color
|
/processorParam:TextureFormat=Color
|
||||||
/build:Textures/icons/Collectables/Wood.png
|
/build:Textures/icons/Collectables/Wood.png
|
||||||
|
|
||||||
|
#begin Textures/icons/ExitZone.png
|
||||||
|
/importer:TextureImporter
|
||||||
|
/processor:TextureProcessor
|
||||||
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
/processorParam:ColorKeyEnabled=True
|
||||||
|
/processorParam:GenerateMipmaps=False
|
||||||
|
/processorParam:PremultiplyAlpha=True
|
||||||
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
|
/processorParam:MakeSquare=False
|
||||||
|
/processorParam:TextureFormat=Color
|
||||||
|
/build:Textures/icons/ExitZone.png
|
||||||
|
|
||||||
|
#begin Textures/icons/ExitZone.png
|
||||||
|
/importer:TextureImporter
|
||||||
|
/processor:TextureProcessor
|
||||||
|
/processorParam:ColorKeyColor=255,0,255,255
|
||||||
|
/processorParam:ColorKeyEnabled=True
|
||||||
|
/processorParam:GenerateMipmaps=False
|
||||||
|
/processorParam:PremultiplyAlpha=True
|
||||||
|
/processorParam:ResizeToPowerOfTwo=False
|
||||||
|
/processorParam:MakeSquare=False
|
||||||
|
/processorParam:TextureFormat=Color
|
||||||
|
/build:Textures/icons/ExitZone.png
|
||||||
|
|
||||||
#begin Textures/icons/Material/Fabric.png
|
#begin Textures/icons/Material/Fabric.png
|
||||||
/importer:TextureImporter
|
/importer:TextureImporter
|
||||||
/processor:TextureProcessor
|
/processor:TextureProcessor
|
||||||
|
|
|
@ -1,15 +1,24 @@
|
||||||
{
|
{
|
||||||
|
"activeFile": "TileMaps/main.tmj",
|
||||||
|
"expandedProjectPaths": [
|
||||||
|
"Templates",
|
||||||
|
"Templates/Zones",
|
||||||
|
"TileMaps",
|
||||||
|
".",
|
||||||
|
"Templates/Enemies"
|
||||||
|
],
|
||||||
"fileStates": {
|
"fileStates": {
|
||||||
"TileMaps/main.tmj": {
|
"TileMaps/main.tmj": {
|
||||||
"scale": 0.33,
|
"scale": 2,
|
||||||
"selectedLayer": 0,
|
"selectedLayer": 1,
|
||||||
"viewCenter": {
|
"viewCenter": {
|
||||||
"x": -463.63636363636374,
|
"x": -682.5,
|
||||||
"y": 300
|
"y": 1140.25
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TileSets/IconSet.tsj": {
|
"TileSets/IconSet.tsj": {
|
||||||
"dynamicWrapping": true
|
"dynamicWrapping": true,
|
||||||
|
"scaleInDock": 1
|
||||||
},
|
},
|
||||||
"TileSets/TileSet 1.tsj": {
|
"TileSets/TileSet 1.tsj": {
|
||||||
"dynamicWrapping": false,
|
"dynamicWrapping": false,
|
||||||
|
@ -18,9 +27,21 @@
|
||||||
"TileSets/TilesetNature.tsj": {
|
"TileSets/TilesetNature.tsj": {
|
||||||
"scaleInDock": 1.5
|
"scaleInDock": 1.5
|
||||||
},
|
},
|
||||||
|
"TileSets/bonfire.tsj": {
|
||||||
|
"dynamicWrapping": false,
|
||||||
|
"scaleInDock": 1
|
||||||
|
},
|
||||||
"TileSets/tileset 1 collision.tsj": {
|
"TileSets/tileset 1 collision.tsj": {
|
||||||
"dynamicWrapping": false,
|
"dynamicWrapping": false,
|
||||||
"scaleInDock": 1
|
"scaleInDock": 1
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"last.objectTemplatePath": "C:/Users/artem/source/repos/ZoFo/ZoFo/Content/MapData/Templates/Zones",
|
||||||
|
"openFiles": [
|
||||||
|
"TileMaps/main.tmj"
|
||||||
|
],
|
||||||
|
"project": "MapSession.tiled-project",
|
||||||
|
"recentFiles": [
|
||||||
|
"TileMaps/main.tmj"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
12
ZoFo/Content/MapData/Templates/Zones/ExitZone.tj
Normal file
12
ZoFo/Content/MapData/Templates/Zones/ExitZone.tj
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ "object":
|
||||||
|
{
|
||||||
|
"height":124,
|
||||||
|
"id":218,
|
||||||
|
"name":"Exit",
|
||||||
|
"rotation":0,
|
||||||
|
"type":"",
|
||||||
|
"visible":true,
|
||||||
|
"width":74
|
||||||
|
},
|
||||||
|
"type":"template"
|
||||||
|
}
|
File diff suppressed because it is too large
Load diff
BIN
ZoFo/Content/Textures/icons/ExitZone.png
Normal file
BIN
ZoFo/Content/Textures/icons/ExitZone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 179 KiB |
BIN
ZoFo/Content/sounds/gun-gunshot-01.wav
Normal file
BIN
ZoFo/Content/sounds/gun-gunshot-01.wav
Normal file
Binary file not shown.
|
@ -22,9 +22,9 @@ using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using ZoFo.GameCore.GUI;
|
using ZoFo.GameCore.GUI;
|
||||||
using ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
|
using ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
|
||||||
using ZoFo.GameCore.GameObjects.MapObjects.StopObjects;
|
using ZoFo.GameCore.GameObjects.MapObjects.StopObjects;
|
||||||
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
|
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
|
||||||
using ZoFo.GameCore.Graphics;
|
using ZoFo.GameCore.Graphics;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||||
|
@ -47,20 +47,24 @@ namespace ZoFo.GameCore
|
||||||
// Отправляются данные апдейтса с обновлением инпута
|
// Отправляются данные апдейтса с обновлением инпута
|
||||||
AppManager.Instance.InputManager.ActionEvent += () =>
|
AppManager.Instance.InputManager.ActionEvent += () =>
|
||||||
{
|
{
|
||||||
networkManager.AddData(new UpdateInput()
|
if (AppManager.Instance.client.networkManager.PlayerId > 0)
|
||||||
{
|
{
|
||||||
InputMovementDirection = AppManager.Instance.InputManager.InputMovementDirection.Serialize(),
|
networkManager.AddData(new UpdateInput()
|
||||||
InputAttackDirection = AppManager.Instance.InputManager.InputAttackDirection.Serialize()
|
{
|
||||||
});
|
InputMovementDirection = AppManager.Instance.InputManager.InputMovementDirection.Serialize(),
|
||||||
|
InputAttackDirection = AppManager.Instance.InputManager.InputAttackDirection.Serialize(),
|
||||||
|
PlayerId = AppManager.Instance.client.networkManager.PlayerId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
AppManager.Instance.InputManager.OnInteract += () =>
|
AppManager.Instance.InputManager.OnInteract += () =>
|
||||||
{
|
{
|
||||||
networkManager.AddData(new UpdateInputInteraction() { });
|
networkManager.AddData(new UpdateInputInteraction() {PlayerId = AppManager.Instance.client.networkManager.PlayerId });
|
||||||
};
|
};
|
||||||
AppManager.Instance.InputManager.ShootEvent += () =>
|
AppManager.Instance.InputManager.ShootEvent += () =>
|
||||||
{
|
{
|
||||||
networkManager.AddData(new UpdateInputShoot() { });
|
networkManager.AddData(new UpdateInputShoot() { PlayerId = AppManager.Instance.client.networkManager.PlayerId });
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,21 +126,21 @@ namespace ZoFo.GameCore
|
||||||
{
|
{
|
||||||
UpdateShaking();
|
UpdateShaking();
|
||||||
for (int i = 0; i < gameObjects.Count; i++)
|
for (int i = 0; i < gameObjects.Count; i++)
|
||||||
{
|
{
|
||||||
gameObjects[i].UpdateAnimations();
|
gameObjects[i].UpdateAnimations();
|
||||||
}
|
}
|
||||||
for (int i = 0; i < particles.Count; i++)
|
for (int i = 0; i < particles.Count; i++)
|
||||||
{
|
{
|
||||||
particles[i].UpdateAnimations();
|
particles[i].UpdateAnimations();
|
||||||
}
|
}
|
||||||
|
|
||||||
networkManager.SendData();//set to ticks
|
networkManager.SendData();//set to ticks
|
||||||
if (myPlayer != null)
|
if (myPlayer != null)
|
||||||
GraphicsComponent.CameraPosition =
|
GraphicsComponent.CameraPosition =
|
||||||
((GraphicsComponent.CameraPosition.ToVector2() *0.9f +
|
((GraphicsComponent.CameraPosition.ToVector2() * 0.9f +
|
||||||
(myPlayer.position + myPlayer.graphicsComponent.ObjectDrawRectangle.Size.ToVector2() / 2 - AppManager.Instance.CurentScreenResolution.ToVector2() / (2 * GraphicsComponent.scaling)
|
(myPlayer.position + myPlayer.graphicsComponent.ObjectDrawRectangle.Size.ToVector2() / 2 - AppManager.Instance.CurentScreenResolution.ToVector2() / (2 * GraphicsComponent.scaling)
|
||||||
) * 0.1f
|
) * 0.1f
|
||||||
) )
|
))
|
||||||
.ToPoint();
|
.ToPoint();
|
||||||
}
|
}
|
||||||
public void SendData()
|
public void SendData()
|
||||||
|
@ -151,14 +155,14 @@ namespace ZoFo.GameCore
|
||||||
}
|
}
|
||||||
for (int i = 0; i < stopObjects.Count; i++)
|
for (int i = 0; i < stopObjects.Count; i++)
|
||||||
{
|
{
|
||||||
stopObjects[i].Draw(spriteBatch);
|
stopObjects[i].Draw(spriteBatch);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < gameObjects.Count; i++)
|
for (int i = 0; i < gameObjects.Count; i++)
|
||||||
{
|
{
|
||||||
gameObjects[i].Draw(spriteBatch);
|
gameObjects[i].Draw(spriteBatch);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < particles.Count; i++)
|
for (int i = 0; i < particles.Count; i++)
|
||||||
{
|
{
|
||||||
particles[i].Draw(spriteBatch);
|
particles[i].Draw(spriteBatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,16 +199,16 @@ namespace ZoFo.GameCore
|
||||||
(update as UpdateStopObjectCreated).collisions.Select(x => x.GetRectangle()).ToArray()
|
(update as UpdateStopObjectCreated).collisions.Select(x => x.GetRectangle()).ToArray()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (update is UpdateGameObjectCreated)
|
else if (update is UpdateGameObjectCreated)
|
||||||
{
|
{
|
||||||
|
//TODO
|
||||||
Entity created_gameObject;
|
Entity created_gameObject;
|
||||||
if ((update as UpdateGameObjectCreated).GameObjectType == "Player")
|
if ((update as UpdateGameObjectCreated).GameObjectType == "Player")
|
||||||
{
|
{
|
||||||
created_gameObject = new Player((update as UpdateGameObjectCreated).position.GetVector2());
|
created_gameObject = new Player((update as UpdateGameObjectCreated).position.GetVector2());
|
||||||
players.Add(created_gameObject as Player);
|
|
||||||
myPlayer = players[0];
|
|
||||||
gameObjects.Add(created_gameObject);
|
gameObjects.Add(created_gameObject);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Type t = Type.GetType("ZoFo.GameCore.GameObjects." + (update as UpdateGameObjectCreated).GameObjectType);
|
Type t = Type.GetType("ZoFo.GameCore.GameObjects." + (update as UpdateGameObjectCreated).GameObjectType);
|
||||||
|
@ -212,7 +216,7 @@ namespace ZoFo.GameCore
|
||||||
if (gameObject is Entity)
|
if (gameObject is Entity)
|
||||||
(gameObject as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
(gameObject as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
||||||
gameObjects.Add(gameObject);
|
gameObjects.Add(gameObject);
|
||||||
}
|
}
|
||||||
(gameObjects.Last() as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
(gameObjects.Last() as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -222,7 +226,7 @@ namespace ZoFo.GameCore
|
||||||
GameObject gameObject = Activator.CreateInstance(t, (update as UpdateGameObjectWithoutIdCreated).position.GetVector2()) as GameObject;
|
GameObject gameObject = Activator.CreateInstance(t, (update as UpdateGameObjectWithoutIdCreated).position.GetVector2()) as GameObject;
|
||||||
if (gameObject is Particle)
|
if (gameObject is Particle)
|
||||||
particles.Add(gameObject as Particle);
|
particles.Add(gameObject as Particle);
|
||||||
}
|
}
|
||||||
else if (update is UpdatePosition)
|
else if (update is UpdatePosition)
|
||||||
{
|
{
|
||||||
var ent = FindEntityById(update.IdEntity);
|
var ent = FindEntityById(update.IdEntity);
|
||||||
|
@ -243,13 +247,17 @@ namespace ZoFo.GameCore
|
||||||
|
|
||||||
if (ent != null)
|
if (ent != null)
|
||||||
DeleteObject(ent);
|
DeleteObject(ent);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (update is UpdatePlayerParametrs)
|
else if (update is UpdateGameEnded)
|
||||||
|
{
|
||||||
|
GameEnd();
|
||||||
|
}
|
||||||
|
else if (update is UpdatePlayerParametrs && update.IdEntity == myPlayer.Id) //aaa
|
||||||
{
|
{
|
||||||
UpdatePlayerHealth(update as UpdatePlayerParametrs);
|
UpdatePlayerHealth(update as UpdatePlayerParametrs);
|
||||||
}
|
}
|
||||||
else if (update is UpdateLoot)
|
else if (update is UpdateLoot && update.IdEntity == myPlayer.Id)//aaa
|
||||||
{
|
{
|
||||||
if ((update as UpdateLoot).quantity == 0)
|
if ((update as UpdateLoot).quantity == 0)
|
||||||
{
|
{
|
||||||
|
@ -259,7 +267,16 @@ namespace ZoFo.GameCore
|
||||||
if (ent != null)
|
if (ent != null)
|
||||||
(ent as Player).lootData.AddLoot_Client((update as UpdateLoot).lootName, (update as UpdateLoot).quantity);
|
(ent as Player).lootData.AddLoot_Client((update as UpdateLoot).lootName, (update as UpdateLoot).quantity);
|
||||||
}
|
}
|
||||||
|
else if (update is UpdateCreatePlayer)
|
||||||
|
{
|
||||||
|
UpdateCreatePlayer ucp = (UpdateCreatePlayer)update;
|
||||||
|
if (networkManager.PlayerId == ucp.PlayerId)
|
||||||
|
{
|
||||||
|
myPlayer = (Player)FindEntityById(ucp.IdEntity);
|
||||||
|
players.Add(myPlayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void UpdatePlayerHealth(UpdatePlayerParametrs update)
|
public void UpdatePlayerHealth(UpdatePlayerParametrs update)
|
||||||
{
|
{
|
||||||
|
@ -289,18 +306,21 @@ namespace ZoFo.GameCore
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var ent = FindEntityById(update.IdEntity);
|
var ent = FindEntityById(update.IdEntity);
|
||||||
|
|
||||||
if (ent != null)
|
if (ent != null)
|
||||||
{
|
{
|
||||||
(ent as Player).health = (update as UpdatePlayerParametrs).health;
|
(ent as Player).health = (update as UpdatePlayerParametrs).health;
|
||||||
(ent as Player).rad = (update as UpdatePlayerParametrs).radiatoin;
|
(ent as Player).rad = (update as UpdatePlayerParametrs).radiatoin;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void GameEnd()
|
||||||
|
{
|
||||||
|
AppManager.Instance.SetGUI(new FinishingGUI());
|
||||||
|
}
|
||||||
|
|
||||||
public Entity FindEntityById(int id)
|
public Entity FindEntityById(int id)
|
||||||
{
|
{
|
||||||
|
@ -328,7 +348,7 @@ namespace ZoFo.GameCore
|
||||||
if (particles.Contains(gameObject))
|
if (particles.Contains(gameObject))
|
||||||
particles.Remove(gameObject as Particle);
|
particles.Remove(gameObject as Particle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void DeleteEntity(Entity entity)
|
public void DeleteEntity(Entity entity)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,17 @@ public class FinishingGUI : AbstractGUI
|
||||||
fontName = "Fonts\\Font",
|
fontName = "Fonts\\Font",
|
||||||
textureName = "Textures/GUI/Button"
|
textureName = "Textures/GUI/Button"
|
||||||
};
|
};
|
||||||
ExitButton.LeftButtonPressed += () => { AppManager.Instance.SetGUI(new MainMenuGUI()); };
|
ExitButton.LeftButtonPressed += () => {
|
||||||
|
|
||||||
|
foreach (var item in AppManager.Instance.client.myPlayer.lootData.loots)
|
||||||
|
{
|
||||||
|
AppManager.Instance.playerData.AddLoot(item.Key, item.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
AppManager.Instance.SetGUI(new MainMenuGUI());
|
||||||
|
|
||||||
|
};
|
||||||
Elements.Add(ExitButton);
|
Elements.Add(ExitButton);
|
||||||
|
|
||||||
//player itams
|
//player itams
|
||||||
|
|
|
@ -82,11 +82,7 @@ public class SelectingServerGUI : AbstractGUI
|
||||||
AppManager.Instance.SetGUI(new WaitingForPlayersGUI(false));
|
AppManager.Instance.SetGUI(new WaitingForPlayersGUI(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception) { }
|
||||||
{
|
|
||||||
|
|
||||||
// throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ваш код здесь
|
// ваш код здесь
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,6 +18,15 @@ namespace ZoFo.GameCore.GameManagers.ItemManager
|
||||||
LoadPlayerData();
|
LoadPlayerData();
|
||||||
}
|
}
|
||||||
public Dictionary<string, int> items = new Dictionary<string, int>();
|
public Dictionary<string, int> items = new Dictionary<string, int>();
|
||||||
|
public void AddLoot(string loot, int quantity)
|
||||||
|
{
|
||||||
|
if (items.ContainsKey(loot))
|
||||||
|
items[loot] += quantity;
|
||||||
|
else
|
||||||
|
items.Add(loot, quantity);
|
||||||
|
|
||||||
|
AppManager.Instance.playerData.SavePlayerData();
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Принимает тэг и крафтит этот объект
|
/// Принимает тэг и крафтит этот объект
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -21,7 +21,8 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
||||||
private static readonly JsonSerializerOptions _options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; // Задача настроек для JsonSerialize
|
private static readonly JsonSerializerOptions _options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; // Задача настроек для JsonSerialize
|
||||||
private static readonly Dictionary<string, string> _classPath = new Dictionary<string, string>() {
|
private static readonly Dictionary<string, string> _classPath = new Dictionary<string, string>() {
|
||||||
{ "Collectables", "ZoFo.GameCore.GameObjects." },
|
{ "Collectables", "ZoFo.GameCore.GameObjects." },
|
||||||
{ "Enemies", "ZoFo.GameCore.GameObjects." }
|
{ "Enemies", "ZoFo.GameCore.GameObjects." },
|
||||||
|
{ "Zones", "ZoFo.GameCore.GameObjects." }
|
||||||
};
|
};
|
||||||
|
|
||||||
//private static readonly float _scale = 1.0f;
|
//private static readonly float _scale = 1.0f;
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
{
|
{
|
||||||
public class ClientNetworkManager
|
public class ClientNetworkManager
|
||||||
{
|
{
|
||||||
private int PlayerId;
|
public int PlayerId;
|
||||||
private IPEndPoint endPoint;
|
private IPEndPoint endPoint;
|
||||||
private IPEndPoint sendingEP;
|
private IPEndPoint sendingEP;
|
||||||
private Socket socket;
|
private Socket socket;
|
||||||
|
@ -138,6 +138,10 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
update = token.ToObject<UpdateGameObjectCreated>();
|
update = token.ToObject<UpdateGameObjectCreated>();
|
||||||
data.Add(update);
|
data.Add(update);
|
||||||
break;
|
break;
|
||||||
|
case "UpdateGameObjectWithoutIdCreated":
|
||||||
|
update = token.ToObject<UpdateGameObjectWithoutIdCreated>();
|
||||||
|
data.Add(update);
|
||||||
|
break;
|
||||||
case "UpdateGameObjectDeleted":
|
case "UpdateGameObjectDeleted":
|
||||||
update = token.ToObject<UpdateGameObjectDeleted>();
|
update = token.ToObject<UpdateGameObjectDeleted>();
|
||||||
data.Add(update);
|
data.Add(update);
|
||||||
|
@ -170,6 +174,10 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
update = token.ToObject<UpdateTileCreated>();
|
update = token.ToObject<UpdateTileCreated>();
|
||||||
data.Add(update);
|
data.Add(update);
|
||||||
break;
|
break;
|
||||||
|
case "UpdateCreatePlayer":
|
||||||
|
update = token.ToObject<UpdateCreatePlayer>();
|
||||||
|
data.Add(update);
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
||||||
private IPAddress ip;
|
private IPAddress ip;
|
||||||
private bool isMultiplayer;
|
private bool isMultiplayer;
|
||||||
//Player Id to Player endPoint
|
//Player Id to Player endPoint
|
||||||
private List<IPEndPoint> clientsEP;
|
public List<IPEndPoint> clientsEP;
|
||||||
public IPEndPoint endPoint;
|
public IPEndPoint endPoint;
|
||||||
private List<UpdateData> commonUpdates;
|
private List<UpdateData> commonUpdates;
|
||||||
private List<UpdateData> importantUpdates;
|
private List<UpdateData> importantUpdates;
|
||||||
|
|
|
@ -14,6 +14,8 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer
|
||||||
// public int IdEntity { get; set; }
|
// public int IdEntity { get; set; }
|
||||||
public SerializableVector2 InputMovementDirection{get;set;}
|
public SerializableVector2 InputMovementDirection{get;set;}
|
||||||
public SerializableVector2 InputAttackDirection {get;set;}
|
public SerializableVector2 InputAttackDirection {get;set;}
|
||||||
|
|
||||||
|
public int PlayerId {get;set;}
|
||||||
public UpdateInput()
|
public UpdateInput()
|
||||||
{
|
{
|
||||||
UpdateType = "UpdateInput";
|
UpdateType = "UpdateInput";
|
||||||
|
|
|
@ -9,4 +9,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer;
|
||||||
public class UpdateInputInteraction : UpdateData
|
public class UpdateInputInteraction : UpdateData
|
||||||
{
|
{
|
||||||
public UpdateInputInteraction() { UpdateType = "UpdateInputInteraction"; }
|
public UpdateInputInteraction() { UpdateType = "UpdateInputInteraction"; }
|
||||||
|
public int PlayerId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,4 +6,5 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer;
|
||||||
public class UpdateInputShoot : UpdateData
|
public class UpdateInputShoot : UpdateData
|
||||||
{
|
{
|
||||||
public UpdateInputShoot() { UpdateType = "UpdateInputShoot"; }
|
public UpdateInputShoot() { UpdateType = "UpdateInputShoot"; }
|
||||||
|
public int PlayerId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using ZoFo.GameCore.GameManagers.NetworkManager.SerializableDTO;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
||||||
|
{
|
||||||
|
public class UpdateCreatePlayer : UpdateData
|
||||||
|
{
|
||||||
|
public int PlayerId { get; set; }
|
||||||
|
public SerializableVector2 position { get; set; }
|
||||||
|
public UpdateCreatePlayer()
|
||||||
|
{
|
||||||
|
isImportant = true;
|
||||||
|
UpdateType = "UpdateCreatePlayer";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,6 +12,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
||||||
public class UpdateGameObjectDeleted : UpdateData
|
public class UpdateGameObjectDeleted : UpdateData
|
||||||
{
|
{
|
||||||
public UpdateGameObjectDeleted() { UpdateType = "UpdateGameObjectDeleted"; isImportant = false; }
|
public UpdateGameObjectDeleted() { UpdateType = "UpdateGameObjectDeleted"; isImportant = false; }
|
||||||
public string GameObjectType;
|
public string GameObjectType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,6 +27,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates
|
||||||
[JsonDerivedType(typeof(UpdatePlayerExit))]
|
[JsonDerivedType(typeof(UpdatePlayerExit))]
|
||||||
[JsonDerivedType(typeof(UpdateInputInteraction))]
|
[JsonDerivedType(typeof(UpdateInputInteraction))]
|
||||||
[JsonDerivedType(typeof(UpdateInputShoot))]
|
[JsonDerivedType(typeof(UpdateInputShoot))]
|
||||||
|
[JsonDerivedType(typeof(UpdateCreatePlayer))]
|
||||||
|
|
||||||
public class UpdateData
|
public class UpdateData
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,10 @@ namespace ZoFo.GameCore.GameObjects
|
||||||
|
|
||||||
public virtual void Delete()
|
public virtual void Delete()
|
||||||
{
|
{
|
||||||
AppManager.Instance.server.DeleteObject(this);
|
if (AppManager.Instance.gamestate == GameState.HostPlaying)
|
||||||
|
{
|
||||||
|
AppManager.Instance.server.DeleteObject(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,9 +111,11 @@ namespace ZoFo.GameCore.GameObjects
|
||||||
public override void DeathEnd()
|
public override void DeathEnd()
|
||||||
{
|
{
|
||||||
|
|
||||||
Instantiate(new Particle(collisionComponent.stopRectangle.Location.ToVector2() + position + ExtentionClass.RandomVector() * 20));
|
Instantiate(new Particle(position - collisionComponent.stopRectangle.Size.ToVector2() / 2 + ExtentionClass.RandomVector() * 20));
|
||||||
Instantiate(new Particle(collisionComponent.stopRectangle.Location.ToVector2() + position + ExtentionClass.RandomVector() * 20));
|
Instantiate(new Particle(position - collisionComponent.stopRectangle.Size.ToVector2() / 2 + ExtentionClass.RandomVector() * 20));
|
||||||
Instantiate(new Particle(collisionComponent.stopRectangle.Location.ToVector2() + position + ExtentionClass.RandomVector() * 20));
|
Instantiate(new Particle(position - collisionComponent.stopRectangle.Size.ToVector2() / 2 + ExtentionClass.RandomVector() * 20));
|
||||||
|
Instantiate(new Particle(position - collisionComponent.stopRectangle.Size.ToVector2() / 2 + ExtentionClass.RandomVector() * 20));
|
||||||
|
Instantiate(new Particle(position - collisionComponent.stopRectangle.Size.ToVector2() / 2 + ExtentionClass.RandomVector() * 20));
|
||||||
|
|
||||||
base.DeathEnd();
|
base.DeathEnd();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ using ZoFo.GameCore.Graphics;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using ZoFo.GameCore.GUI;
|
using ZoFo.GameCore.GUI;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ZoFo.GameCore.GameObjects;
|
namespace ZoFo.GameCore.GameObjects;
|
||||||
|
|
||||||
|
@ -221,7 +222,12 @@ public class Player : LivingEntity
|
||||||
{
|
{
|
||||||
InputPlayerRotation = updateInput.InputMovementDirection.GetVector2();
|
InputPlayerRotation = updateInput.InputMovementDirection.GetVector2();
|
||||||
InputWeaponRotation = updateInput.InputAttackDirection.GetVector2();
|
InputWeaponRotation = updateInput.InputAttackDirection.GetVector2();
|
||||||
DebugHUD.DebugSet("dir", InputWeaponRotation.ToString());
|
if (InputPlayerRotation.X != 0f || InputPlayerRotation.Y != 0f)
|
||||||
|
{
|
||||||
|
InputPlayerRotation /= (InputPlayerRotation.Length());
|
||||||
|
}
|
||||||
|
DebugHUD.DebugSet("dir", InputPlayerRotation.ToString());
|
||||||
|
DebugHUD.DebugSet("dir2", InputWeaponRotation.ToString());
|
||||||
}
|
}
|
||||||
public void HandleInteract(UpdateInputInteraction updateInputInteraction)
|
public void HandleInteract(UpdateInputInteraction updateInputInteraction)
|
||||||
{
|
{
|
||||||
|
@ -252,18 +258,21 @@ public class Player : LivingEntity
|
||||||
reloading = 5;
|
reloading = 5;
|
||||||
IsTryingToShoot = true;
|
IsTryingToShoot = true;
|
||||||
|
|
||||||
Entity[] entities = AppManager.Instance.server.collisionManager.GetEntities(GetDamageArea(InputWeaponRotation), this);
|
List<Entity> entities = AppManager.Instance.server.collisionManager.GetEntities(GetDamageArea(InputWeaponRotation), this).ToList();
|
||||||
|
entities.AddRange(AppManager.Instance.server.collisionManager.GetEntities(GetDamageArea(InputWeaponRotation, 2), this).ToList());
|
||||||
|
entities.AddRange(AppManager.Instance.server.collisionManager.GetEntities(GetDamageArea(InputWeaponRotation, 3), this).ToList());
|
||||||
|
|
||||||
if (entities != null)
|
if (entities != null)
|
||||||
{
|
{
|
||||||
foreach (Entity entity in entities)
|
foreach (Entity entity in entities)
|
||||||
{
|
{
|
||||||
if (entity is Enemy)
|
if (entity is Enemy)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 3; i <= 3; i++)
|
||||||
{
|
{
|
||||||
Instantiate(new Particle(
|
Instantiate(new Particle(
|
||||||
(collisionComponent.stopRectangle.Location.ToVector2() * i / 3f) +
|
((position - graphicsComponent.ObjectDrawRectangle.Size.ToVector2() / 2) * (3 - i) / 3f) +
|
||||||
(collisionComponent.stopRectangle.Location.ToVector2() * (3 - i) / 3f)
|
((entity.position - graphicsComponent.ObjectDrawRectangle.Size.ToVector2() / 2) * i / 3f) + ExtentionClass.RandomVector() * 3
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -276,9 +285,11 @@ public class Player : LivingEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
DrawDebugRectangle(spriteBatch, GetDamageArea(AppManager.Instance.InputManager.InputAttackDirection), Color.Green);
|
DrawDebugRectangle(spriteBatch, GetDamageArea(AppManager.Instance.InputManager.InputAttackDirection), Color.Green);
|
||||||
|
DrawDebugRectangle(spriteBatch, GetDamageArea(AppManager.Instance.InputManager.InputAttackDirection, 2), Color.Green);
|
||||||
|
DrawDebugRectangle(spriteBatch, GetDamageArea(AppManager.Instance.InputManager.InputAttackDirection, 3), Color.Green);
|
||||||
base.Draw(spriteBatch);
|
base.Draw(spriteBatch);
|
||||||
}
|
}
|
||||||
public Rectangle GetDamageArea(Vector2 direction)
|
public Rectangle GetDamageArea(Vector2 direction, float mult = 1)
|
||||||
{
|
{
|
||||||
direction.Normalize();
|
direction.Normalize();
|
||||||
var rect = collisionComponent.stopRectangle.SetOrigin(position);
|
var rect = collisionComponent.stopRectangle.SetOrigin(position);
|
||||||
|
@ -287,7 +298,7 @@ public class Player : LivingEntity
|
||||||
rect.Y -= size;
|
rect.Y -= size;
|
||||||
rect.Width += 2 * size;
|
rect.Width += 2 * size;
|
||||||
rect.Height += 2 * size;
|
rect.Height += 2 * size;
|
||||||
rect = rect.SetOrigin(direction * 40);
|
rect = rect.SetOrigin(direction * 40 * mult);
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,11 +16,16 @@ namespace ZoFo.GameCore.GameObjects
|
||||||
|
|
||||||
public Particle(Vector2 position) : base(position)
|
public Particle(Vector2 position) : base(position)
|
||||||
{
|
{
|
||||||
graphicsComponent.ObjectDrawRectangle = new Rectangle(-30, -30,60,60).SetOrigin(position);
|
graphicsComponent.ObjectDrawRectangle = new Rectangle(0, 0,60,60).SetOrigin(position);
|
||||||
(graphicsComponent as AnimatedGraphicsComponent).actionOfAnimationEnd += _ => {
|
AppManager.Instance.SoundManager.StartSound("gun-gunshot-01", Vector2.Zero, Vector2.Zero, 0.5f, (float)(Random.Shared.NextDouble()*2-1));
|
||||||
|
(graphicsComponent as AnimatedGraphicsComponent).actionOfAnimationEnd += _ => {
|
||||||
|
|
||||||
|
if (AppManager.Instance.client!=null)
|
||||||
|
{
|
||||||
AppManager.Instance.client.DeleteObject(this);
|
AppManager.Instance.client.DeleteObject(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
42
ZoFo/GameCore/GameObjects/ExitZone.cs
Normal file
42
ZoFo/GameCore/GameObjects/ExitZone.cs
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
using Microsoft.Xna.Framework;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using ZoFo.GameCore.GameManagers;
|
||||||
|
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||||
|
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||||
|
using ZoFo.GameCore.Graphics;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameObjects
|
||||||
|
{
|
||||||
|
public class ExitZone : Entity
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public override GraphicsComponent graphicsComponent { get; } = new StaticGraphicsComponent("Content/Textures/icons/ExitZone");
|
||||||
|
public ExitZone(Vector2 position) : base(position)
|
||||||
|
{
|
||||||
|
collisionComponent.OnTriggerZone += Exit;
|
||||||
|
graphicsComponent.ObjectDrawRectangle.Width = 100;
|
||||||
|
graphicsComponent.ObjectDrawRectangle.Height = 100;
|
||||||
|
position = new Vector2(500f, 500f);
|
||||||
|
collisionComponent.isTrigger = true;
|
||||||
|
collisionComponent.triggerRectangle = new Rectangle(0, 0, 100, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Exit(GameObject sender)
|
||||||
|
{
|
||||||
|
if (sender is Player &&
|
||||||
|
AppManager.Instance.server.collisionManager.GetPlayersInZone(collisionComponent.triggerRectangle.SetOrigin(position)).Length == AppManager.Instance.server.players.Count)
|
||||||
|
{
|
||||||
|
sender.position = new Vector2(0f, 0f);
|
||||||
|
AppManager.Instance.server.EndGame();
|
||||||
|
AppManager.Instance.debugHud.Set("Exit", sender.position.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,6 +24,7 @@ public abstract class GameObject
|
||||||
graphicsComponent.ObjectDrawRectangle.X = (int)position.X;
|
graphicsComponent.ObjectDrawRectangle.X = (int)position.X;
|
||||||
graphicsComponent.ObjectDrawRectangle.Y = (int)position.Y;
|
graphicsComponent.ObjectDrawRectangle.Y = (int)position.Y;
|
||||||
|
|
||||||
|
positionDraw = position;
|
||||||
}
|
}
|
||||||
public virtual void UpdateLogic()
|
public virtual void UpdateLogic()
|
||||||
{
|
{
|
||||||
|
@ -43,7 +44,10 @@ public abstract class GameObject
|
||||||
|
|
||||||
public void Instantiate(GameObject gameObject)
|
public void Instantiate(GameObject gameObject)
|
||||||
{
|
{
|
||||||
AppManager.Instance.server.RegisterGameObject(gameObject);
|
if (AppManager.Instance.gamestate == GameState.HostPlaying)
|
||||||
|
{
|
||||||
|
AppManager.Instance.server.RegisterGameObject(gameObject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -69,20 +69,32 @@ namespace ZoFo.GameCore
|
||||||
{
|
{
|
||||||
case "UpdateInput":
|
case "UpdateInput":
|
||||||
if (players.Count > 0)
|
if (players.Count > 0)
|
||||||
players[0].HandleNewInput(updateData as UpdateInput);//TODO id instead of 0
|
{
|
||||||
|
UpdateInput data = updateData as UpdateInput;
|
||||||
|
players[data.PlayerId - 1].HandleNewInput(data);
|
||||||
|
}
|
||||||
|
//TODO id instead of 0
|
||||||
else
|
else
|
||||||
DebugHUD.DebugLog("NO PLAYER ON MAP");
|
DebugHUD.DebugLog("NO PLAYER ON MAP");
|
||||||
break;
|
break;
|
||||||
case "UpdateTileCreated":
|
case "UpdateTileCreated":
|
||||||
break;
|
break;
|
||||||
case "UpdateInputInteraction":
|
case "UpdateInputInteraction":
|
||||||
players[0].HandleInteract(updateData as UpdateInputInteraction);
|
if (players.Count > 0)
|
||||||
|
{
|
||||||
|
UpdateInputInteraction data = updateData as UpdateInputInteraction;
|
||||||
|
players[data.PlayerId - 1].HandleInteract(data);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "UpdateInputShoot":
|
case "UpdateInputShoot":
|
||||||
players[0].HandleShoot(updateData as UpdateInputShoot);
|
if (players.Count > 0)
|
||||||
|
{
|
||||||
|
UpdateInputShoot data = updateData as UpdateInputShoot;
|
||||||
|
players[data.PlayerId - 1].HandleShoot(data);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}//Поспать
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -121,14 +133,19 @@ namespace ZoFo.GameCore
|
||||||
gameObjects = new List<GameObject>();
|
gameObjects = new List<GameObject>();
|
||||||
entities = new List<Entity>();
|
entities = new List<Entity>();
|
||||||
networkManager.StartGame();
|
networkManager.StartGame();
|
||||||
new MapManager().LoadMap();
|
new MapManager().LoadMap();
|
||||||
|
|
||||||
//AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
//AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
||||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(760, 140)));
|
for (int i = 0; i < networkManager.clientsEP.Count; i++)
|
||||||
|
{
|
||||||
|
Player player = new Player(new Vector2(760 - 30 * i, 140));
|
||||||
|
RegisterGameObject(player);
|
||||||
|
networkManager.AddData(new UpdateCreatePlayer() { PlayerId = i+1, IdEntity=player.Id});
|
||||||
|
}
|
||||||
//for (int i = 0; i < 20; i++)
|
//for (int i = 0; i < 20; i++)
|
||||||
// for (int j = 0; j < 20; j++)
|
// for (int j = 0; j < 20; j++)
|
||||||
// AppManager.Instance.server.RegisterGameObject(new Zombie(new Vector2(1300 + i*70, 1000+j*70)));
|
// AppManager.Instance.server.RegisterGameObject(new Zombie(new Vector2(1300 + i*70, 1000+j*70)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -137,7 +154,8 @@ namespace ZoFo.GameCore
|
||||||
public void EndGame()
|
public void EndGame()
|
||||||
{
|
{
|
||||||
UpdateGameEnded gameEnded = new UpdateGameEnded();
|
UpdateGameEnded gameEnded = new UpdateGameEnded();
|
||||||
networkManager.AddData(gameEnded);
|
networkManager.AddData(gameEnded);
|
||||||
|
// networkManager.CloseConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GameObject> gameObjects = new List<GameObject>();
|
public List<GameObject> gameObjects = new List<GameObject>();
|
||||||
|
@ -208,7 +226,6 @@ namespace ZoFo.GameCore
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameObject is Entity entity)
|
if (gameObject is Entity entity)
|
||||||
{
|
{
|
||||||
AddData(new UpdateGameObjectCreated()
|
AddData(new UpdateGameObjectCreated()
|
||||||
|
|
Loading…
Add table
Reference in a new issue