chenzhen 6 år sedan
förälder
incheckning
b2e5919a56
100 ändrade filer med 17321 tillägg och 387 borttagningar
  1. 1 1
      ShootLaya/bin/fileconfig.json
  2. 569 79
      ShootLaya/bin/js/bundle.js
  3. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/Black.jpg
  4. 75 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/Materials/Black.lmat
  5. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/gun1-GUN_pCube1.lm
  6. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/gun1-GUN_pCube2.lm
  7. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/gun1-Shell.lm
  8. 1 1
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/New Material 1.lmat
  9. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Black.jpg
  10. 71 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Black.lmat
  11. 58 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Floor.lmat
  12. 54 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Gray.lmat
  13. 54 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Red.lmat
  14. 1711 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface11-ShootRole1 (1)-pasted__polySurface11Avatar.lav
  15. 1711 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface11-ShootRole1-pasted__polySurface11Avatar.lav
  16. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface11-pasted__polySurface11.lm
  17. 1711 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-ShootRole1-pasted__polySurface112Avatar.lav
  18. 1711 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-moster_shoot1 (1)-pasted__polySurface112Avatar.lav
  19. 1711 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-moster_shoot1 (2)-pasted__polySurface112Avatar.lav
  20. 1711 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-moster_shoot1-pasted__polySurface112Avatar.lav
  21. 1711 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-player_shoot1-pasted__polySurface112Avatar.lav
  22. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/wall-Wall.lm
  23. 1 1
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/New Material.lmat
  24. 1625 0
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/GameScene.ls
  25. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Library/unity default resources-Cylinder.lm
  26. BIN
      ShootLaya/bin/res/LayaScene_GameScene/Conventional/Library/unity default resources-Plane.lm
  27. 58 0
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/GM.lmat
  28. 1 1
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/New Material 2.lmat
  29. BIN
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/LastRes/Black.jpg
  30. 71 0
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/LastRes/Materials/Black.lmat
  31. BIN
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/LastRes/wall-Wall.lm
  32. 58 0
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/RM.lmat
  33. BIN
      ShootLaya/bin/res/LayaScene_main/Conventional/Assets/Roles/run-hunterm_body_000.lm
  34. 1571 158
      ShootLaya/bin/res/LayaScene_main/Conventional/main.ls
  35. 42 0
      ShootLaya/bin/res/LevelCfg/Level1.json
  36. 19 0
      ShootLaya/bin/res/atlas/.rec
  37. 1 0
      ShootLaya/bin/res/atlas/cc.atlas
  38. BIN
      ShootLaya/bin/res/atlas/cc.png
  39. 1 0
      ShootLaya/bin/res/atlas/main_res.atlas
  40. BIN
      ShootLaya/bin/res/atlas/main_res.png
  41. 24 0
      ShootLaya/bin/res/scene.json
  42. BIN
      ShootLaya/laya/assets/cc/1.png
  43. BIN
      ShootLaya/laya/assets/cc/10.png
  44. BIN
      ShootLaya/laya/assets/cc/11.png
  45. BIN
      ShootLaya/laya/assets/cc/12.png
  46. BIN
      ShootLaya/laya/assets/cc/13.png
  47. BIN
      ShootLaya/laya/assets/cc/2.png
  48. BIN
      ShootLaya/laya/assets/cc/3.png
  49. BIN
      ShootLaya/laya/assets/cc/4.png
  50. BIN
      ShootLaya/laya/assets/cc/5.png
  51. BIN
      ShootLaya/laya/assets/cc/6.png
  52. BIN
      ShootLaya/laya/assets/cc/7.png
  53. BIN
      ShootLaya/laya/assets/cc/8.png
  54. BIN
      ShootLaya/laya/assets/cc/9.png
  55. BIN
      ShootLaya/laya/assets/main_res/chongxin_1_1.png
  56. BIN
      ShootLaya/laya/assets/main_res/jiemian_xin_1_1.png
  57. 1 0
      ShootLaya/laya/pageStyles.xml
  58. 23 2
      ShootLaya/laya/pages/game_ui.scene
  59. 40 0
      ShootLaya/laya/pages/main_ui.scene
  60. 2 2
      ShootLaya/src/GameConfig.ts
  61. 2 2
      ShootLaya/src/Main.ts
  62. 0 31
      ShootLaya/src/game_logic/AssetController.ts
  63. 79 24
      ShootLaya/src/game_logic/Bullet.ts
  64. 6 6
      ShootLaya/src/game_logic/BulletController.ts
  65. 81 0
      ShootLaya/src/game_logic/CameraBehavior.ts
  66. 26 0
      ShootLaya/src/game_logic/GameController.ts
  67. 25 8
      ShootLaya/src/game_logic/GameSceneController.ts
  68. 117 3
      ShootLaya/src/game_logic/Moster.ts
  69. 27 0
      ShootLaya/src/game_logic/MosterController.ts
  70. 72 13
      ShootLaya/src/game_logic/Player.ts
  71. 1 1
      ShootLaya/src/game_logic/Pool_Manager.ts
  72. 37 8
      ShootLaya/src/game_logic/Role.ts
  73. 40 12
      ShootLaya/src/game_logic/RoleController.ts
  74. 7 6
      ShootLaya/src/game_logic/ViewManager.ts
  75. 25 9
      ShootLaya/src/game_module/GameDefined.ts
  76. 2 2
      ShootLaya/src/game_module/NetManager.ts
  77. 25 1
      ShootLaya/src/game_tool/Game_Tool.ts
  78. 38 10
      ShootLaya/src/game_ui/game_ui.ts
  79. 34 0
      ShootLaya/src/game_ui/main_ui.ts
  80. 11 1
      ShootLaya/src/ui/layaMaxUI.ts
  81. BIN
      Shootunity/.vs/Shootunity/v16/.suo
  82. 0 0
      Shootunity/.vs/Shootunity/v16/Server/sqlite3/db.lock
  83. BIN
      Shootunity/.vs/Shootunity/v16/Server/sqlite3/storage.ide
  84. 10 5
      Shootunity/Assembly-CSharp.csproj
  85. 9 0
      Shootunity/Assets/CrackRes.meta
  86. BIN
      Shootunity/Assets/CrackRes/Black.png
  87. 68 0
      Shootunity/Assets/CrackRes/Black.png.meta
  88. 9 0
      Shootunity/Assets/CrackRes/Levels.meta
  89. BIN
      Shootunity/Assets/CrackRes/Levels/Black.png
  90. 68 0
      Shootunity/Assets/CrackRes/Levels/Black.png.meta
  91. BIN
      Shootunity/Assets/CrackRes/Levels/Facialhair.png
  92. 68 0
      Shootunity/Assets/CrackRes/Levels/Facialhair.png.meta
  93. 9 0
      Shootunity/Assets/CrackRes/Levels/Materials.meta
  94. BIN
      Shootunity/Assets/New Material.mat
  95. 9 0
      Shootunity/Assets/CrackRes/Levels/Materials/Facialhair.mat.meta
  96. BIN
      Shootunity/Assets/New Material 1.mat
  97. 9 0
      Shootunity/Assets/CrackRes/Levels/Materials/Glasses.mat.meta
  98. BIN
      Shootunity/Assets/CrackRes/Levels/Materials/Gray.mat
  99. 9 0
      Shootunity/Assets/CrackRes/Levels/Materials/Gray.mat.meta
  100. 0 0
      Shootunity/Assets/CrackRes/Levels/Materials/Texture01.mat

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
ShootLaya/bin/fileconfig.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 569 - 79
ShootLaya/bin/js/bundle.js


BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/Black.jpg


+ 75 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/Materials/Black.lmat

@@ -0,0 +1,75 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"Black",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"metallic":0,
+		"smoothness":0.5,
+		"smoothnessTextureScale":1,
+		"smoothnessSource":0,
+		"normalTextureScale":1,
+		"parallaxTextureScale":0.02,
+		"occlusionTextureStrength":1,
+		"textures":[
+			{
+				"name":"albedoTexture",
+				"path":"../Black.jpg",
+				"constructParams":[
+					8,
+					8,
+					0,
+					true
+				],
+				"propertyParams":{
+					"filterMode":1,
+					"wrapModeU":0,
+					"wrapModeV":0,
+					"anisoLevel":1
+				}
+			}
+		],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					1,
+					0.3722233,
+					0,
+					1
+				]
+			},
+			{
+				"name":"emissionColor",
+				"value":[
+					0,
+					0,
+					0,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/gun1-GUN_pCube1.lm


BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/gun1-GUN_pCube2.lm


BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/CrackRes/gun1-Shell.lm


+ 1 - 1
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/New Material 1.lmat

@@ -2,7 +2,7 @@
 	"version":"LAYAMATERIAL:02",
 	"props":{
 		"type":"Laya.BlinnPhongMaterial",
-		"name":"New Material 1",
+		"name":"GM",
 		"renderStates":[
 			{
 				"cull":2,

BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Black.jpg


+ 71 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Black.lmat

@@ -0,0 +1,71 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"Black",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"enableVertexColor":false,
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.04,
+		"textures":[
+			{
+				"name":"albedoTexture",
+				"path":"../Black.jpg",
+				"constructParams":[
+					8,
+					8,
+					0,
+					true
+				],
+				"propertyParams":{
+					"filterMode":1,
+					"wrapModeU":0,
+					"wrapModeV":0,
+					"anisoLevel":1
+				}
+			}
+		],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"specularColor",
+				"value":[
+					1,
+					1,
+					1
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					1,
+					1,
+					1,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

+ 58 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Floor.lmat

@@ -0,0 +1,58 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"Floor",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"metallic":0,
+		"smoothness":0.5,
+		"smoothnessTextureScale":1,
+		"smoothnessSource":0,
+		"normalTextureScale":1,
+		"parallaxTextureScale":0.02,
+		"occlusionTextureStrength":1,
+		"textures":[],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					1,
+					1,
+					1,
+					1
+				]
+			},
+			{
+				"name":"emissionColor",
+				"value":[
+					0,
+					0,
+					0,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

+ 54 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Gray.lmat

@@ -0,0 +1,54 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"Gray",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"enableVertexColor":false,
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
+		"textures":[],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"specularColor",
+				"value":[
+					1,
+					1,
+					1
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					0.5598377,
+					1,
+					0.5441177,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

+ 54 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/Materials/Red.lmat

@@ -0,0 +1,54 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"Red",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"enableVertexColor":false,
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
+		"textures":[],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"specularColor",
+				"value":[
+					1,
+					1,
+					1
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					0.9852941,
+					0.2318339,
+					0.2318339,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1711 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface11-ShootRole1 (1)-pasted__polySurface11Avatar.lav


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1711 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface11-ShootRole1-pasted__polySurface11Avatar.lav


BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface11-pasted__polySurface11.lm


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1711 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-ShootRole1-pasted__polySurface112Avatar.lav


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1711 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-moster_shoot1 (1)-pasted__polySurface112Avatar.lav


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1711 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-moster_shoot1 (2)-pasted__polySurface112Avatar.lav


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1711 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-moster_shoot1-pasted__polySurface112Avatar.lav


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1711 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/pasted__polySurface112-player_shoot1-pasted__polySurface112Avatar.lav


BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Assets/LastRes/wall-Wall.lm


+ 1 - 1
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/New Material.lmat

@@ -2,7 +2,7 @@
 	"version":"LAYAMATERIAL:02",
 	"props":{
 		"type":"Laya.BlinnPhongMaterial",
-		"name":"New Material",
+		"name":"RM",
 		"renderStates":[
 			{
 				"cull":2,

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1625 - 0
ShootLaya/bin/res/LayaScene_GameScene/Conventional/GameScene.ls


BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Library/unity default resources-Cylinder.lm


BIN
ShootLaya/bin/res/LayaScene_GameScene/Conventional/Library/unity default resources-Plane.lm


+ 58 - 0
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/GM.lmat

@@ -0,0 +1,58 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"GM",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"metallic":0,
+		"smoothness":0.5,
+		"smoothnessTextureScale":1,
+		"smoothnessSource":0,
+		"normalTextureScale":1,
+		"parallaxTextureScale":0.02,
+		"occlusionTextureStrength":1,
+		"textures":[],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					0,
+					1,
+					0.3379312,
+					1
+				]
+			},
+			{
+				"name":"emissionColor",
+				"value":[
+					0,
+					0,
+					0,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

+ 1 - 1
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/New Material 2.lmat

@@ -2,7 +2,7 @@
 	"version":"LAYAMATERIAL:02",
 	"props":{
 		"type":"Laya.BlinnPhongMaterial",
-		"name":"New Material 2",
+		"name":"HM",
 		"renderStates":[
 			{
 				"cull":2,

BIN
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/LastRes/Black.jpg


+ 71 - 0
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/LastRes/Materials/Black.lmat

@@ -0,0 +1,71 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"Black",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"enableVertexColor":false,
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.04,
+		"textures":[
+			{
+				"name":"albedoTexture",
+				"path":"../Black.jpg",
+				"constructParams":[
+					8,
+					8,
+					0,
+					true
+				],
+				"propertyParams":{
+					"filterMode":1,
+					"wrapModeU":0,
+					"wrapModeV":0,
+					"anisoLevel":1
+				}
+			}
+		],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"specularColor",
+				"value":[
+					1,
+					1,
+					1
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					1,
+					1,
+					1,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

BIN
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/LastRes/wall-Wall.lm


+ 58 - 0
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/RM.lmat

@@ -0,0 +1,58 @@
+{
+	"version":"LAYAMATERIAL:02",
+	"props":{
+		"type":"Laya.BlinnPhongMaterial",
+		"name":"RM",
+		"renderStates":[
+			{
+				"cull":2,
+				"blend":0,
+				"srcBlend":1,
+				"dstBlend":0,
+				"depthWrite":true,
+				"depthTest":515
+			}
+		],
+		"alphaTest":false,
+		"alphaTestValue":0.5,
+		"renderQueue":2000,
+		"metallic":0,
+		"smoothness":0.5,
+		"smoothnessTextureScale":1,
+		"smoothnessSource":0,
+		"normalTextureScale":1,
+		"parallaxTextureScale":0.02,
+		"occlusionTextureStrength":1,
+		"textures":[],
+		"vectors":[
+			{
+				"name":"tilingOffset",
+				"value":[
+					1,
+					1,
+					0,
+					0
+				]
+			},
+			{
+				"name":"albedoColor",
+				"value":[
+					0.9852941,
+					0.1231618,
+					0.1231618,
+					1
+				]
+			},
+			{
+				"name":"emissionColor",
+				"value":[
+					0,
+					0,
+					0,
+					1
+				]
+			}
+		],
+		"defines":[]
+	}
+}

BIN
ShootLaya/bin/res/LayaScene_main/Conventional/Assets/Roles/run-hunterm_body_000.lm


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1571 - 158
ShootLaya/bin/res/LayaScene_main/Conventional/main.ls


+ 42 - 0
ShootLaya/bin/res/LevelCfg/Level1.json

@@ -0,0 +1,42 @@
+{
+    "sceneCom": [
+        {
+            "name": "wall (2)",
+            "pos": [
+                0,
+                0.5,
+                -20.92
+            ],
+            "scale": [
+                113.52,
+                12.93065,
+                1
+            ],
+            "rotation": [
+                0,
+                0,
+                0,
+                -1
+            ]
+        },
+        {
+            "name": "wall",
+            "pos": [
+                0,
+                0.5,
+                26.89
+            ],
+            "scale": [
+                113.52,
+                12.93065,
+                1
+            ],
+            "rotation": [
+                0,
+                0,
+                0,
+                -1
+            ]
+        }
+    ]
+}

+ 19 - 0
ShootLaya/bin/res/atlas/.rec

@@ -0,0 +1,19 @@
+D .
+D cc
+P 976E382B 1.png
+P 3CBE401E 10.png
+P 69303078 11.png
+P 2216784E 12.png
+P FABD8AA9 13.png
+P 660F2C88 2.png
+P 2AB2CD20 3.png
+P 6F120A90 4.png
+P 803A4B71 5.png
+P 02939F9A 6.png
+P 73D4D2F3 7.png
+P 919D7378 8.png
+P 72CD2093 9.png
+D Load_res
+D main_res
+P 39B2B723 chongxin_1_1.png
+P 62C66DE5 jiemian_xin_1_1.png

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
ShootLaya/bin/res/atlas/cc.atlas


BIN
ShootLaya/bin/res/atlas/cc.png


+ 1 - 0
ShootLaya/bin/res/atlas/main_res.atlas

@@ -0,0 +1 @@
+{"frames":{"chongxin_1_1.png":{"frame":{"h":136,"idx":0,"w":420,"x":0,"y":0},"sourceSize":{"h":136,"w":420},"spriteSourceSize":{"x":0,"y":0}},"jiemian_xin_1_1.png":{"frame":{"h":151,"idx":0,"w":363,"x":0,"y":137},"sourceSize":{"h":151,"w":363},"spriteSourceSize":{"x":0,"y":0}}},"meta":{"image":"main_res.png","prefix":"main_res/"}}

BIN
ShootLaya/bin/res/atlas/main_res.png


+ 24 - 0
ShootLaya/bin/res/scene.json

@@ -0,0 +1,24 @@
+{
+    "sceneCom": [
+        {
+            "name":"",
+            "pos": [],
+            "scale": [],
+            "rotation": []
+        }
+    ],
+    "player": [
+        {
+            "pos": [],
+            "scale": [],
+            "rotation": []
+        }
+    ],
+    "moster": [
+        {
+            "pos": [],
+            "scale": [],
+            "rotation": []
+        }
+    ]
+}

BIN
ShootLaya/laya/assets/cc/1.png


BIN
ShootLaya/laya/assets/cc/10.png


BIN
ShootLaya/laya/assets/cc/11.png


BIN
ShootLaya/laya/assets/cc/12.png


BIN
ShootLaya/laya/assets/cc/13.png


BIN
ShootLaya/laya/assets/cc/2.png


BIN
ShootLaya/laya/assets/cc/3.png


BIN
ShootLaya/laya/assets/cc/4.png


BIN
ShootLaya/laya/assets/cc/5.png


BIN
ShootLaya/laya/assets/cc/6.png


BIN
ShootLaya/laya/assets/cc/7.png


BIN
ShootLaya/laya/assets/cc/8.png


BIN
ShootLaya/laya/assets/cc/9.png


BIN
ShootLaya/laya/assets/main_res/chongxin_1_1.png


BIN
ShootLaya/laya/assets/main_res/jiemian_xin_1_1.png


+ 1 - 0
ShootLaya/laya/pageStyles.xml

@@ -16,4 +16,5 @@
    <item name="Sign_ui.scene" props="" ifExport="内嵌模式" aName=""/>
    <item name="TryOut_ui.scene" props="" ifExport="内嵌模式" aName=""/>
    <item name="game_ui.scene" props="" ifExport="内嵌模式" aName=""/>
+   <item name="main_ui.scene" props="" ifExport="内嵌模式" aName=""/>
 </page>

+ 23 - 2
ShootLaya/laya/pages/game_ui.scene

@@ -1,6 +1,27 @@
 {
+    "x":0,
     "type":"Scene",
-    "props":{"width":720,"sceneColor":"#000000","height":1280},
+    "selectedBox":2,
+    "selecteID":3,
+    "searchKey":"Scene",
+    "props":{"zOrder":1,"width":720,"sceneColor":"#000000","height":1280},
+    "nodeParent":-1,
+    "maxID":5,
+    "label":"Scene",
+    "isOpen":true,
+    "isDirectory":false,
+    "isAniNode":true,
+    "hasChild":false,
+    "compId":2,
     "child":[
-        ]
+        ],
+    "animations":[
+        {
+            "nodes":[
+                ],
+            "name":"ani1",
+            "id":1,
+            "frameRate":24,
+            "action":0
+        }]
 }

+ 40 - 0
ShootLaya/laya/pages/main_ui.scene

@@ -0,0 +1,40 @@
+{
+    "x":0,
+    "type":"Scene",
+    "selectedBox":2,
+    "selecteID":3,
+    "searchKey":"Scene",
+    "props":{"zOrder":1,"width":720,"sceneColor":"#000000","height":1280},
+    "nodeParent":-1,
+    "maxID":4,
+    "label":"Scene",
+    "isOpen":true,
+    "isDirectory":true,
+    "isAniNode":true,
+    "hasChild":true,
+    "compId":2,
+    "child":[
+        {
+            "x":15,
+            "type":"Image",
+            "searchKey":"Image,start_btn",
+            "props":{"y":640,"x":360,"var":"start_btn","skin":"main_res/jiemian_xin_1_1.png","runtime":"game_ui/RunTimeScript/ButtonRunTime.ts","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
+            "nodeParent":2,
+            "label":"start_btn",
+            "isDirectory":false,
+            "isAniNode":true,
+            "hasChild":false,
+            "compId":3,
+            "child":[
+                ]
+        }],
+    "animations":[
+        {
+            "nodes":[
+                ],
+            "name":"ani1",
+            "id":1,
+            "frameRate":24,
+            "action":0
+        }]
+}

+ 2 - 2
ShootLaya/src/GameConfig.ts

@@ -1,5 +1,5 @@
 /**This class is automatically generated by LayaAirIDE, please do not make any modifications. */
-
+import ButtonRunTime from "./game_ui/RunTimeScript/ButtonRunTime"
 /*
 * 游戏初始化配置;
 */
@@ -19,7 +19,7 @@ export default class GameConfig{
     constructor(){}
     static init(){
         var reg: Function = Laya.ClassUtils.regClass;
-
+        reg("game_ui/RunTimeScript/ButtonRunTime.ts",ButtonRunTime);
     }
 }
 GameConfig.init();

+ 2 - 2
ShootLaya/src/Main.ts

@@ -10,7 +10,7 @@ export class Main {
 
 	public static nowratio: number;
 	public static IsWx: boolean = false;
-	public static VRE = "1.0.5";
+	public static VRE = "1.0.0";
 	public static CFG = "CFG";
 	public static wxValue = "";
 	constructor() {
@@ -92,7 +92,7 @@ export class Main {
 		this.LoadUI();
 	}
 	LoadUI() {
-		ViewManager.Instance.OpenView(ViewType.game_ui);
+		ViewManager.Instance.OpenView(ViewType.main_ui);
 		GameSceneController.Instance.CreateScene();
 			//this.test();
 	}

+ 0 - 31
ShootLaya/src/game_logic/AssetController.ts

@@ -16,36 +16,5 @@ export default class AssetController {
     public _role: Laya.Sprite3D;
 
 
-    public CreateScene() {
-        ResourceLoad.LoadResource([this.path], () => {
-            var t = Laya.loader.getRes(this.path) as Laya.Scene3D;
-            Laya.stage.addChild(t);
-            this._scenes = t;
-            this._bullet = t.getChildByName("bullet") as Laya.Sprite3D;
-            BulletController.Instance.init(this._bullet);
-            this._role = t.getChildByName("role") as Laya.Sprite3D;
-            RoleController.Instance.init(this._role);
-          //  this._bulletPos = this._role.getChildByName("bulltePos") as Laya.Sprite3D;
-        });
-    }
-
-    private createRay() {
-        var forw = new Laya.Vector3();
-        this._role.transform.getForward(forw);
-        forw = new Laya.Vector3(-forw.x, -forw.y, -forw.z);
-        //   Laya.Vector3.normalize()
-        var _ray = new Laya.Ray(this._bulletPos.transform.position, forw);
-        var _hit = new Laya.HitResult();
-        var isS = this._scenes.physicsSimulation.rayCast(_ray, _hit);
-        this._bullet.transform.position = this._bulletPos.transform.position;
-        this._bullet.transform.rotation = this._role.transform.rotation;
-        if (isS) {
-            var poi = _hit.point;
-            var nor = Laya.Vector3.distance(this._bulletPos.transform.position, poi);
-            this._bullet.transform.localScaleZ = nor;
-        } else {
-            this._bullet.transform.localScaleZ = 50;
-        }
-    }
 
 }

+ 79 - 24
ShootLaya/src/game_logic/Bullet.ts

@@ -1,5 +1,5 @@
-import { Role } from "./Role";
-import GameDefined, { CheckType } from "../game_module/GameDefined";
+
+import GameDefined, { CheckType, BulletType } from "../game_module/GameDefined";
 import Vector3 = Laya.Vector3;
 import Ray = Laya.Ray;
 import HitResult = Laya.HitResult;
@@ -8,7 +8,9 @@ import BulletController from "./BulletController";
 import Sprite3D = Laya.Sprite3D;
 import Transform3D = Laya.Transform3D;
 import Game_Tool from "../game_tool/Game_Tool";
-export class Bullet extends Laya.Script {
+import { EventManager } from "../game_module/EventManager";
+import { Role } from "./Role";
+export class Bullet extends Laya.Script3D {
     constructor() {
         super();
     }
@@ -17,8 +19,8 @@ export class Bullet extends Laya.Script {
     private self: Sprite3D;
     onAwake() {
         this.self = this.owner as Sprite3D;
-        this.forw = new Vector3(0, 0, 0);
         this._transform = this.self.transform;
+        this.forw = new Vector3(0, 0, 0);
         this._corss = new Vector3(0, 0, 0);
     }
 
@@ -28,29 +30,33 @@ export class Bullet extends Laya.Script {
     private go: Sprite3D;
     private goS: Bullet;
     private _corss: Vector3;
-    CreateRay(pos: Vector3, _rotation) {
+    CreateRay(pos: Vector3, _rotation, _type?) {
         if (!this.go) {
-            this.go = BulletController.Instance.CreateBullet();
+
+            switch (_type) {
+                case BulletType.BulletG:
+                    this.go = BulletController.Instance.CreateBullet(GameDefined.poolName.bulletG);
+                    break;
+
+                case BulletType.BulletR:
+                    this.go = BulletController.Instance.CreateBullet(GameDefined.poolName.BulletR);
+                    break;
+            }
             var gs = this.go.getComponent(Bullet);
             if (!gs) this.goS = this.go.addComponent(Bullet);
         } else {
             this.go.active = true;
         }
         this.go.transform.position = pos.clone();
-        this.go.transform.rotationEuler = _rotation;
-        // this._transform.getForward(this.forw);
+           this.go.transform.rotationEuler = _rotation;
+        this.go.transform.rotate = _rotation;
         this.go.transform.getForward(this.forw);
         this.forw = new Vector3(-this.forw.x, -this.forw.y, -this.forw.z);
-        var temp=this.forw.clone();
+        var temp = this.forw.clone();
         Vector3.normalize(temp, temp);
-        //    this.forw = new Vector3(this.forW.x * this.speed, this.forW.y * this.speed, this.forW.z * this.speed);
-
-
-       // var temp = new Vector3(-this.forw.x * 0.01, -this.forw.y * 0.01, -this.forw.z * 0.01);
-
-        pos.x = pos.x + temp.x*0.01;
-        pos.y = pos.y + temp.y*0.01;
-        pos.z = pos.z + temp.z*0.01;
+        pos.x = pos.x + temp.x * 0.01;
+        pos.y = pos.y + temp.y * 0.01;
+        pos.z = pos.z + temp.z * 0.01;
 
         if (!this._ray) {
             this._ray = new Ray(pos, this.forw);
@@ -60,35 +66,84 @@ export class Bullet extends Laya.Script {
             this._ray.direction = this.forw;
         }
 
-
         var isS = GameSceneController.Instance.game_scene.physicsSimulation.rayCast(this._ray, this._hit);
         if (isS) {
             var poi = this._hit.point;
             var dis = Vector3.distance(pos, poi);
             this.go.transform.localScaleZ = dis;
             var other = this._hit.collider.owner as Sprite3D;
-            if (other.layer == GameDefined.player_layer) {
+            if (other.layer == GameDefined.player_layer || other.layer == GameDefined.moster_layer) {
+                this.tempPos = pos;
+                this.tempRotation = _rotation;
+                this.SetTar(other);
                 this.goS.SetNextNotActive();
             } else {
+                this.RemoveTar();
                 var nor = this._hit.normal;
-                console.log(nor);
+                nor.x = Math.abs(nor.x) < 0.001 ? 0 : nor.x;
+                nor.y = Math.abs(nor.y) < 0.001 ? 0 : nor.y;
+                nor.z = Math.abs(nor.z) < 0.001 ? 0 : nor.z;
+
+
+
                 Vector3.cross(this.forw, nor, this._corss);//大于0在左方 小于0在右方
+
+
                 var a = Game_Tool.getReflectAng(this.forw);
-                var ang = this._transform.rotationEuler.clone();
+                // Laya.Quaternion.
+                var ang = this.go._transform.rotationEuler.clone();
                 this._corss.y >= 0 ? ang.y = ang.y + 2 * a : ang.y = ang.y - 2 * a;
-                this.goS.CreateRay(poi, ang);
-            }
 
+                // var ab=new Laya.Quaternion();
+                // Laya.Quaternion.createFromAxisAngle(this.forw,-a,ab)
+                // this.goS.CreateRay(poi, ab, BulletType.BulletG);
+
+
+                this.goS.CreateRay(poi, ang, _type);
+            }
         } else {
+            this.RemoveTar();
             this.go.transform.localScaleZ = 50;
             this.goS.SetNextNotActive();
         }
     }
 
-    public SetNextNotActive() {
+    SetNextNotActive() {
         if (this.go) {
             this.go.active = false;
             if (this.goS) this.goS.SetNextNotActive();
         }
     }
+
+
+    private HitTar: Sprite3D;
+    private RemoveTar() {
+        if (this.HitTar) {
+            this.HitTar = null;
+        }
+    }
+    private SetTar(tar) {
+        this.HitTar = tar;
+    }
+
+
+    private tempPos: Vector3;
+    private tempRotation: any;
+    private Hit() {
+        if (this.HitTar) {
+            if (this.HitTar.layer == GameDefined.player_layer || this.HitTar.layer == GameDefined.moster_layer) {
+                var r = this.HitTar.getComponent(Role) as Role;
+                r.HitEd();
+                this.CreateRay(this.tempPos, this.tempRotation);
+            }
+        }
+    }
+
+    onEnable() {
+        EventManager.on(GameDefined.HitEvent, this, this.Hit);
+    }
+
+    onDisable() {
+        EventManager.off(GameDefined.HitEvent, this, this.Hit);
+    }
 }

+ 6 - 6
ShootLaya/src/game_logic/BulletController.ts

@@ -7,17 +7,17 @@ export default class BulletController {
     public static get Instance(): BulletController {
         return this.instance || (this.instance = new BulletController());
     }
-    private bulletPref: Sprite3D;
-    public init(bullet: Sprite3D) {
+   // private bulletPref: Sprite3D;
+    public init(bullet: Sprite3D,poolName:string) {
         bullet.removeSelf();
-        this.bulletPref = bullet;
-        Pool_Manager.Instance.InitData(GameDefined.poolName.bullet, this.bulletPref);
+      //  this.bulletPref = bullet;
+        Pool_Manager.Instance.InitData(poolName, bullet);
     }
 
     private bullet: Sprite3D;
-    public CreateBullet(): Sprite3D {
+    public CreateBullet(bulletName): Sprite3D {
         //if (this.bullet) return this.bullet;
-        var go = Pool_Manager.Instance.SetActiveObject(GameDefined.poolName.bullet);
+        var go = Pool_Manager.Instance.SetActiveObject(bulletName);
         GameSceneController.Instance.game_scene.addChild(go);
        // this.bullet = go;
         return go;

+ 81 - 0
ShootLaya/src/game_logic/CameraBehavior.ts

@@ -0,0 +1,81 @@
+import { Main } from "../Main";
+import Game_Tool from "../game_tool/Game_Tool";
+import Vector3 = Laya.Vector3;
+import Sprite3D = Laya.Sprite3D;
+import Transform3D = Laya.Transform3D;
+export default class CameraBehavior extends Laya.Script3D {
+    public target: Sprite3D;
+    private selfObj: Laya.Camera;
+
+    public dis: Vector3 = new Vector3(0, -9.18, 6.81);
+    constructor() {
+        super();
+    }
+
+    private target_Tra: Transform3D;
+    private ration = 2.54883;
+    onAwake() {
+        this.selfObj = this.owner as Laya.Camera;
+        let origSize = this.selfObj.fieldOfView;
+        let origratio = 0.5;//    原始屏幕的宽高比
+        let nowratio = Main.nowratio;
+        let nowSize = Main.nowratio * origSize / origratio;
+        this.selfObj.fieldOfView = nowSize;
+    }
+
+    // onUpdate(){
+    //     if(!this.target_Tra)return;
+    //     if(!LevelSceneController.cameraCanFollow)return;
+    //     let temp: Vector3 = new Vector3();
+    //     temp.x =  -3-this.dis.x;
+    //     temp.y = this.target_Tra.position.y - this.dis.y;
+    //     temp.z = this.target_Tra.position.z - this.dis.z;
+    //     let temp2 = new Vector3();
+    //     this.selfObj.transform.position = temp.clone();
+    // }
+    // public set GetDisPos(target: Sprite3D) {
+    //   this.target=target;
+    //   this.target_Tra=this.target.transform;
+    // }
+    // onDestroy(){
+    //   this.target=null;
+    //   this.target_Tra=null
+    // }
+
+
+    public startShake = false;  //camera是否开始震动
+    public seconds = 0;    //震动持续秒数
+    public started = false;    //是否已经开始震动
+    public quake = 0.2;       //震动系数
+
+    private camPOS: Laya.Vector3 //camera的起始位置
+    public ShakeFor(a, b) {
+        //    LevelSceneController.cameraCanFollow = false;
+        this.camPOS = this.selfObj.transform.position.clone();
+        this.seconds = a;
+        this.started = true;
+        this.startShake = true;
+        this.quake = b;
+
+    }
+    onLateUpdate() {
+        if (this.startShake) {
+            this.Quake();
+        }
+        if (this.started) {
+            this.started = false;
+            Laya.timer.once(this.seconds * 1000, this, () => {
+                this.startShake = false;
+                this.selfObj.transform.position = this.camPOS;
+                //   LevelSceneController.cameraCanFollow = true;
+            })
+        }
+    }
+    private Quake() {
+        var x = Game_Tool.random_1to1() * this.quake;
+        var y = Game_Tool.random_1to1() * this.quake;
+        var z = Game_Tool.random_1to1() * this.quake;
+        var temp = new Vector3(this.camPOS.x + Math.random() * this.quake, this.camPOS.y + Math.random() * this.quake, this.camPOS.z + Math.random() * this.quake);
+        this.selfObj.transform.position = temp;
+    }
+}

+ 26 - 0
ShootLaya/src/game_logic/GameController.ts

@@ -0,0 +1,26 @@
+import { EventManager } from "../game_module/EventManager";
+import GameDefined from "../game_module/GameDefined";
+
+export class GameController {
+    private static instasnce: GameController;
+    public static get Instance(): GameController {
+        return this.instasnce || (this.instasnce = new GameController());
+    }
+
+
+    public ishit = false;
+    public Hit() {
+        EventManager.event(GameDefined.HitEvent);
+    }
+
+
+    public gameStart = false;
+    public gameover = true;
+
+
+
+    public GameStart() {
+        this.gameStart = true;
+        this.gameover = false;
+    }
+}

+ 25 - 8
ShootLaya/src/game_logic/GameSceneController.ts

@@ -1,8 +1,9 @@
 import ResourceLoad from "../game_module/ResourceLoad";
-
 import Scene3D = Laya.Scene3D;
 import BulletController from "./BulletController";
 import { RoleController } from "./RoleController";
+import GameDefined from "../game_module/GameDefined";
+import Sprite3D=Laya.Sprite3D;
 export default class GameSceneController {
     private static instance: GameSceneController;
     public static get Instance(): GameSceneController {
@@ -11,16 +12,32 @@ export default class GameSceneController {
 
 
     public game_scene: Scene3D;
-    public path = "res/LayaScene_main/Conventional/main.ls";
+  
     public CreateScene() {
-        ResourceLoad.LoadResource([this.path], () => {
-            var t = Laya.loader.getRes(this.path) as Laya.Scene3D;
+        ResourceLoad.LoadResource([GameDefined.game_scene_path], () => {
+            var t = Laya.loader.getRes(GameDefined.game_scene_path) as Scene3D;
             Laya.stage.addChild(t);
             this.game_scene = t;
-            var _bullet = t.getChildByName("bullet") as Laya.Sprite3D;
-            BulletController.Instance.init(_bullet);
-            var _role = t.getChildByName("role") as Laya.Sprite3D;
-            RoleController.Instance.init(_role);
+
+            var _bulletG = t.getChildByName("bulletG") as Sprite3D;
+            var _bulletR=t.getChildByName("bulletR")as Sprite3D;
+            BulletController.Instance.init(_bulletG,GameDefined.poolName.bulletG);
+            BulletController.Instance.init(_bulletR,GameDefined.poolName.BulletR);
+
+            // var _role1 = t.getChildByName("role1") as Sprite3D;
+            // var _role2 = t.getChildByName("role2") as Sprite3D;
+
+            
+            // var _moster1 = t.getChildByName("moster1") as Sprite3D;
+            // var _moster2= t.getChildByName("moster2") as Sprite3D;
+          
+
+            var players=t.getChildByName("Players")as Sprite3D;
+            var mosters=t.getChildByName("Mosters")as Sprite3D;
+
+            RoleController.Instance.initPlayer(players._children);
+
+            RoleController.Instance.initMoster(mosters._children);
            
             RoleController.Instance.CreateRay();
         });

+ 117 - 3
ShootLaya/src/game_logic/Moster.ts

@@ -1,6 +1,15 @@
-import { Role } from "./Role";
-import { CheckType } from "../game_module/GameDefined";
 
+import GameDefined, { CheckType, BulletType } from "../game_module/GameDefined";
+import { Role } from "./Role";
+import Vector3=Laya.Vector3;
+import Ray=Laya.Ray;
+import HitResult=Laya.HitResult;
+import Sprite3D=Laya.Sprite3D
+import { Bullet } from "./Bullet";
+import BulletController from "./BulletController";
+import GameSceneController from "./GameSceneController";
+import Game_Tool from "../game_tool/Game_Tool";
+import { EventManager } from "../game_module/EventManager";
 
 export class Moster extends Role {
     constructor() {
@@ -9,6 +18,111 @@ export class Moster extends Role {
 
     onAwake() {
         super.onAwake();
-        this._type=CheckType.Moster;
+        this._type = CheckType.Moster;
+        this.forw = new Vector3(0, 0, 0);
+        this._corss = new Vector3(0, 0, 0);
+        this._bulletPos = this.self.getChildByName("bulletPos") as Sprite3D;
+    }
+
+    private forw: Vector3;
+    private _ray: Ray;
+    private _hit: HitResult;
+
+    private _corss: Vector3;
+
+    private go: Sprite3D;
+    private goS: Bullet;
+    CreateRay() {
+        this._transform.getForward(this.forw);
+        this.forw = new Vector3(-this.forw.x, -this.forw.y, -this.forw.z);
+        if (!this._ray) {
+            this._ray = new Ray(this._bulletPos.transform.position, this.forw);
+            this._hit = new HitResult();
+        } else {
+            this._ray.origin = this._bulletPos.transform.position;
+            this._ray.direction = this.forw;
+        }
+        if (!this.go) {
+            this.go = BulletController.Instance.CreateBullet(GameDefined.poolName.BulletR);
+            var gs = this.go.getComponent(Bullet);
+            if (!gs) this.goS = this.go.addComponent(Bullet);
+        }
+        this.go.transform.position = this._bulletPos.transform.position;
+        this.go.transform.rotation = this._transform.rotation;
+        var isS = GameSceneController.Instance.game_scene.physicsSimulation.rayCast(this._ray, this._hit);
+        if (isS) {
+            var poi = this._hit.point;
+            var dis = Vector3.distance(this._bulletPos.transform.position, poi);
+            this.go.transform.localScaleZ = dis;
+
+            var other = this._hit.collider.owner as Sprite3D;
+            if (other.layer == GameDefined.player_layer || other.layer == GameDefined.moster_layer) {
+                this.SetTar(other);
+                this.goS.SetNextNotActive();
+            } else {
+                this.RemoveTar();
+                var nor = this._hit.normal;
+                nor.x = Math.abs(nor.x) < 0.001 ? 0 : nor.x;
+                nor.y = Math.abs(nor.y) < 0.001 ? 0 : nor.y;
+                nor.z = Math.abs(nor.z) < 0.001 ? 0 : nor.z;
+                Vector3.cross(this.forw, nor, this._corss);//大于0在左方 小于0在右方
+                var a = Game_Tool.getReflectAng(this.forw);
+                var ang = this._transform.rotationEuler.clone();
+                this._corss.y >= 0 ? ang.y = ang.y + 2 * a : ang.y = ang.y - 2 * a;
+                this.goS.CreateRay(poi, ang,BulletType.BulletR);
+            }
+        } else {
+            this.RemoveTar();
+            this.go.transform.localScaleZ = 50;
+            this.goS.SetNextNotActive();
+        }
+    }
+
+    RotationSelf(rota: Vector3) {
+        this._transform.rotate(rota);
+        this.CreateRay();
+    }
+
+    SetNextNotActive() {
+        if (this.go) {
+            this.go.active = false;
+            if (this.goS) this.goS.SetNextNotActive();
+        }
+    }
+
+
+    private HitTar:Sprite3D;
+    private RemoveTar(){
+        if(this.HitTar){
+            this.HitTar=null;
+        }
+    }
+    private SetTar(tar){
+        this.HitTar=tar;
+    }
+    private Hit(){
+        if(this.HitTar){
+            //Game_Tool.CreateText(this.HitTar.name+"被击杀!");
+            if( this.HitTar.layer == GameDefined.player_layer ||  this.HitTar.layer == GameDefined.moster_layer){
+              var r=  this.HitTar.getComponent(Role)as Role;
+              r.HitEd();
+             this.CreateRay();
+            //  this.CreateRay();
+            }
+           
+            
+           // EventManager.off(GameDefined.HitEvent,this, this.Hit);
+        }
+    }
+
+
+
+    onEnable(){
+        EventManager.on(GameDefined.HitEvent,this, this.Hit);
+        this._ishited=false;
+    }
+
+    onDisable(){
+        EventManager.off(GameDefined.HitEvent,this, this.Hit);
     }
 }

+ 27 - 0
ShootLaya/src/game_logic/MosterController.ts

@@ -0,0 +1,27 @@
+
+
+import Sprite3D=Laya.Sprite3D;
+import Vector3=Laya.Vector3;
+import { Player } from "./Player";
+export class RoleController {
+    private static instasnce: RoleController;
+    public static get Instance(): RoleController {
+        return this.instasnce || (this.instasnce = new RoleController());
+    }
+
+
+    public player:Sprite3D;
+    public playerS:Player;
+    public init(role:Sprite3D){
+        if(role){
+            this.player=role;
+            this.playerS=this.player.addComponent(Player);
+        }
+    }
+    public CreateRay(){
+        if(this.playerS)this.playerS.CreateRay();
+    }
+    public RoleRotation(rota:Vector3){
+        if(this.playerS)this.playerS.RotationSelf(rota);
+    }
+}

+ 72 - 13
ShootLaya/src/game_logic/Player.ts

@@ -1,5 +1,5 @@
 import { Role } from "./Role";
-import { CheckType } from "../game_module/GameDefined";
+import GameDefined, { CheckType, BulletType } from "../game_module/GameDefined";
 import Vector3 = Laya.Vector3;
 import Ray = Laya.Ray;
 import HitResult = Laya.HitResult;
@@ -8,6 +8,7 @@ import BulletController from "./BulletController";
 import Sprite3D = Laya.Sprite3D;
 import { Bullet } from "./Bullet";
 import Game_Tool from "../game_tool/Game_Tool";
+import { EventManager } from "../game_module/EventManager";
 export class Player extends Role {
     constructor() {
         super();
@@ -18,7 +19,9 @@ export class Player extends Role {
         this._type = CheckType.Player;
         this.forw = new Vector3(0, 0, 0);
         this._corss = new Vector3(0, 0, 0);
+        this._bulletPos = this.self.getChildByName("bulletPos") as Sprite3D;
     }
+    idhit = false;
 
     private forw: Vector3;
     private _ray: Ray;
@@ -26,8 +29,8 @@ export class Player extends Role {
 
     private _corss: Vector3;
 
-    private go: Sprite3D;
-    private goS: Bullet;
+    public go: Sprite3D;
+    public goS: Bullet;
     CreateRay() {
         this._transform.getForward(this.forw);
         this.forw = new Vector3(-this.forw.x, -this.forw.y, -this.forw.z);
@@ -39,34 +42,90 @@ export class Player extends Role {
             this._ray.direction = this.forw;
         }
         if (!this.go) {
-            this.go = BulletController.Instance.CreateBullet();
+            this.go = BulletController.Instance.CreateBullet(GameDefined.poolName.bulletG);
             var gs = this.go.getComponent(Bullet);
             if (!gs) this.goS = this.go.addComponent(Bullet);
         }
         this.go.transform.position = this._bulletPos.transform.position;
         this.go.transform.rotation = this._transform.rotation;
-        //  this.go.transform.getForward(this.forw);
         var isS = GameSceneController.Instance.game_scene.physicsSimulation.rayCast(this._ray, this._hit);
-
         if (isS) {
             var poi = this._hit.point;
             var dis = Vector3.distance(this._bulletPos.transform.position, poi);
             this.go.transform.localScaleZ = dis;
-            var nor = this._hit.normal;
-            Vector3.cross(this.forw, nor, this._corss);//大于0在左方 小于0在右方
-            var a = Game_Tool.getReflectAng(this.forw);
-            var ang = this._transform.rotationEuler.clone();
-            this._corss.y >= 0 ? ang.y = ang.y + 2 * a : ang.y = ang.y - 2 * a;
-            this.goS.CreateRay(poi, ang);
+
+            var other = this._hit.collider.owner as Sprite3D;
+            if (other.layer == GameDefined.player_layer || other.layer == GameDefined.moster_layer) {
+                this.SetTar(other);
+                this.goS.SetNextNotActive();
+            } else {
+                this.RemoveTar();
+                var nor = this._hit.normal;
+                nor.x = Math.abs(nor.x) < 0.001 ? 0 : nor.x;
+                nor.y = Math.abs(nor.y) < 0.001 ? 0 : nor.y;
+                nor.z = Math.abs(nor.z) < 0.001 ? 0 : nor.z;
+                Vector3.cross(this.forw, nor, this._corss);//大于0在左方 小于0在右方
+                var a = Game_Tool.getReflectAng(this.forw);
+                var ang = this._transform.rotationEuler.clone();
+                this._corss.y >= 0 ? ang.y = ang.y + 2 * a : ang.y = ang.y - 2 * a;
+
+
+                // var v1=new Vector3(0.8,0,0.6);  //向量1 
+                // var nor=new Vector3(-1,0,0);    //v1碰撞法线
+
+                // var ab=new Laya.Quaternion();
+                // Laya.Quaternion.createFromAxisAngle(this.forw,a,ab)
+                // this.goS.CreateRay(poi, ab, BulletType.BulletG);
+
+                this.goS.CreateRay(poi, ang, BulletType.BulletG);
+            }
         } else {
+            this.RemoveTar();
             this.go.transform.localScaleZ = 50;
             this.goS.SetNextNotActive();
         }
-        //  console.log(go.transform.localScaleZ);
     }
 
     RotationSelf(rota: Vector3) {
+      //  console.log(rota);
+      //  console.log(this._transform.rotationEuler);
         this._transform.rotate(rota);
+      //  console.log(this._transform.rotationEuler);
         this.CreateRay();
     }
+
+    SetNextNotActive() {
+        if (this.go) {
+            this.go.active = false;
+            if (this.goS) this.goS.SetNextNotActive();
+        }
+    }
+
+    private HitTar: Sprite3D;
+    private RemoveTar() {
+        if (this.HitTar) {
+            this.HitTar = null;
+        }
+    }
+    private SetTar(tar) {
+        this.HitTar = tar;
+    }
+    private Hit() {
+        if (this.HitTar) {
+            if (this.HitTar.layer == GameDefined.player_layer || this.HitTar.layer == GameDefined.moster_layer) {
+                var r = this.HitTar.getComponent(Role) as Role;
+                r.HitEd();
+                this.CreateRay();
+            }
+        }
+    }
+
+    onEnable() {
+        EventManager.on(GameDefined.HitEvent, this, this.Hit);
+        this._ishited = false;
+    }
+
+    onDisable() {
+        EventManager.off(GameDefined.HitEvent, this, this.Hit);
+    }
 }

+ 1 - 1
ShootLaya/src/game_logic/Pool_Manager.ts

@@ -17,7 +17,7 @@ export class Pool_Manager {
     //预设对象
     private prefabDic: Dictionary;
 
-    // [ "Coin"  "Key"  "Role"  "Body1"   "Train" ]
+    // [  ]
     public InitData(name: string, prefab) {
         if (prefab != null) {
             if (!this.prefabDic.has(name))

+ 37 - 8
ShootLaya/src/game_logic/Role.ts

@@ -1,18 +1,47 @@
-import Sprite3D=Laya.Sprite3D;
-import Transform3D=Laya.Transform3D;
-import { CheckType } from "../game_module/GameDefined";
+import Sprite3D = Laya.Sprite3D;
+import Transform3D = Laya.Transform3D;
+import GameDefined, { CheckType } from "../game_module/GameDefined";
+import Vector3 = Laya.Vector3;
+import Ray = Laya.Ray;
+import HitResult = Laya.HitResult;
+import { Bullet } from "./Bullet";
+import BulletController from "./BulletController";
+import GameSceneController from "./GameSceneController";
+import Game_Tool from "../game_tool/Game_Tool";
+import { EventManager } from "../game_module/EventManager";
 export class Role extends Laya.Script3D {
     constructor() {
         super();
     }
 
-    protected self:Sprite3D;
-    protected _transform:Transform3D;
-    protected _type:CheckType;
-    protected _bulletPos:Sprite3D;
+    protected self: Sprite3D;
+    protected _transform: Transform3D;
+    protected _type: CheckType;
+    protected _bulletPos: Sprite3D;
+    protected _ishited: boolean;
     onAwake() {
         this.self = this.owner as Sprite3D;
         this._transform = this.self.transform;
-        this._bulletPos=this.self.getChildByName("bulltePos")as Sprite3D;
     }
+
+
+    HitEd() {
+        if (this._ishited) return;
+        switch (this._type) {
+            case CheckType.Player:
+            console.log()
+                break;
+
+            case CheckType.Moster:
+
+                break;
+        }
+        this.SetNextNotActive();
+        this.self.active=false;
+    }
+
+    protected  SetNextNotActive() {
+        
+    }
+
 }

+ 40 - 12
ShootLaya/src/game_logic/RoleController.ts

@@ -1,7 +1,8 @@
 
-import Sprite3D=Laya.Sprite3D;
+import Sprite3D = Laya.Sprite3D;
 import { Player } from "./Player";
-import Vector3=Laya.Vector3;
+import Vector3 = Laya.Vector3;
+import { Moster } from "./Moster";
 export class RoleController {
     private static instasnce: RoleController;
     public static get Instance(): RoleController {
@@ -9,18 +10,45 @@ export class RoleController {
     }
 
 
-    public player:Sprite3D;
-    public playerS:Player;
-    public init(role:Sprite3D){
-        if(role){
-            this.player=role;
-            this.playerS=this.player.addComponent(Player);
+    // public player:Sprite3D;
+    // public playerS:Player;
+
+    public playerArr = [];
+    public mosterArr = [];
+
+    public behaviorArr = [];
+    public initPlayer(roles) {
+        for (let index = 0; index < roles.length; index++) {
+            const element = roles[index];
+            var beh = element.addComponent(Player);
+            this.behaviorArr.push(beh);
+        }
+        // if(role){
+        //     this.player=role;
+        //     this.playerS=this.player.addComponent(Player);
+        // }
+    }
+
+    public initMoster(mosters) {
+        for (let index = 0; index < mosters.length; index++) {
+            const element = mosters[index];
+            var beh = element.addComponent(Moster);
+            this.behaviorArr.push(beh);
         }
     }
-    public CreateRay(){
-        if(this.playerS)this.playerS.CreateRay();
+    public CreateRay() {
+        for (let index = 0; index < this.behaviorArr.length; index++) {
+            const element = this.behaviorArr[index];
+            element.CreateRay();
+
+        }
+        //  if(this.playerS)this.playerS.CreateRay();
     }
-    public RoleRotation(rota:Vector3){
-        if(this.playerS)this.playerS.RotationSelf(rota);
+    public RoleRotation(rota: Vector3) {
+        // if(this.playerS)this.playerS.RotationSelf(rota);
+        for (let index = 0; index < this.behaviorArr.length; index++) {
+            const element = this.behaviorArr[index];
+            element.RotationSelf(rota);
+        }
     }
 }

+ 7 - 6
ShootLaya/src/game_logic/ViewManager.ts

@@ -1,9 +1,11 @@
 import Dictionary from "../game_tool/Dictionary";
 import { game_ui } from "../game_ui/game_ui";
+import { main_ui } from "../game_ui/main_ui";
 
 
 export enum ViewType {
-    game_ui
+    game_ui,
+    main_ui
 }
 export default class ViewManager {
     private static instance: ViewManager;
@@ -17,21 +19,20 @@ export default class ViewManager {
     private curView: any;
     private addViewDic = new Dictionary();
     init() {
-        this.viewDic[ViewType.game_ui]=game_ui;
+        this.viewDic[ViewType.game_ui] = game_ui;
+        this.viewDic[ViewType.main_ui] = main_ui;
     }
     public OpenView(view: ViewType, data?: any) {
         if (this.curView != null) {
             this.curView.OnClose();
             Laya.stage.removeChild(this.curView);
-            //    var  a:Laya.Scene;
-            //    a.destroy()
             this.curView.destroy(true);
             this.curView = null;
         }
         this.curView = new this.viewDic[view];
 
         Laya.stage.addChild(this.curView);
-        // this.curView.resizeHander();
+      
         this.curView.OnShow(data);
 
     }
@@ -67,7 +68,7 @@ export default class ViewManager {
         if (this.curMask != null) {
             return;
         }
-      //  this.curMask = new Mask_ui();
+        //  this.curMask = new Mask_ui();
         if (!this.curMask) return;
         Laya.stage.addChild(this.curMask);
     }

+ 25 - 9
ShootLaya/src/game_module/GameDefined.ts

@@ -1,21 +1,37 @@
 
 export default class GameDefined {
-    public static player_layer=9;
-    public static wall_layer=8;
-    public static moster_layer=10;
-    public static boss_layer=11;
-    public static tree_layer=12;
-    public static bomb_layer=13;
+    public static player_layer = 9;
+    public static wall_layer = 8;
+    public static moster_layer = 10;
+    public static boss_layer = 11;
+    public static tree_layer = 12;
+    public static bomb_layer = 13;
 
 
-    public static poolName={
-        bullet:"bullet"
+    public static HitEvent = "HitEvent";
+
+
+    public static game_scene_path ="res/LayaScene_main/Conventional/main.ls";
+                                   //"res/LayaScene_GameScene/Conventional/GameScene.ls";
+
+    public static poolName = {
+        bulletG: "bulletG",
+        BulletR: "BulletR"
     }
+
+    public static uiRes = [
+        "res/atlas/main_res.atlas",
+        "res/atlas/main_res.png "
+    ];
 }
-export enum CheckType{
+export enum CheckType {
     Player,
     Moster,
     Boss,
     Bomb,
     Tree
 }
+export enum BulletType {
+    BulletR,
+    BulletG
+}

+ 2 - 2
ShootLaya/src/game_module/NetManager.ts

@@ -104,8 +104,8 @@ export default class NetManager {
         UserModel.Instance.SetUserModel(new NetUserModel(data["token"], data["configs"], data["app_setting"], data["user"], data["user_base"], data["user_invite"], data["user_lottery"], data["user_treasure"], data["t"], data["user_achievement"], data["user_sign"], data["user_arena"]));
         console.log(UserModel.Instance.CurModel.openid);
         completecb(data);
-        WXSdk.ShareMessage();
-        FYHD_Sdk.PushData();
+     //   WXSdk.ShareMessage();
+      //  FYHD_Sdk.PushData();
     }
 
     public PostCfgRequest(completecb: Function, errorcb: Function): void {

+ 25 - 1
ShootLaya/src/game_tool/Game_Tool.ts

@@ -41,7 +41,7 @@ export default class Game_Tool {
         var xx=Math.abs(dir.x);
         var zz=Math.abs(dir.z);
         var obl= Math.sqrt(Math.pow(dir.x, 2) + Math.pow(dir.z, 2));
-        return 180 / Math.PI * Math.acos(xx / obl);
+        return 90- 180 / Math.PI * Math.acos(xx / obl);
     }
 
     public static random_1to1():number{ 
@@ -128,4 +128,28 @@ export default class Game_Tool {
     //     }
     //     return false;
     // }
+
+    public static CreateText(content:string){
+        var curText = new Laya.Text;
+        curText.width = 300;
+        curText.height = 50;
+        
+        curText.align = "center";
+        curText.valign = "middle";
+        curText.font = "Microsoft YaHei";
+        curText.fontSize = 35;
+        curText.color = "#ff8e00";
+        curText.bold = true;
+        curText.font = "Microsoft YaHei";
+        curText.text = content;
+        curText.x = 60;
+        curText.y = 10;
+        Laya.stage.addChild(curText);
+        console.log(curText);
+        var tween = Laya.Tween.to(parent,{y:curText.y - 200},1000,Laya.Ease.expoInOut,Laya.Handler.create(this,()=>
+        {
+            tween.clear();
+            curText.destroy();
+        }),100);
+    }
 }

+ 38 - 10
ShootLaya/src/game_ui/game_ui.ts

@@ -1,7 +1,8 @@
 import { ui } from "../ui/layaMaxUI";
 import { EventManager } from "../game_module/EventManager";
 import { RoleController } from "../game_logic/RoleController";
-
+import Vector3 = Laya.Vector3;
+import { GameController } from "../game_logic/GameController";
 export class game_ui extends ui.game_uiUI implements UI_Interface {
 
 
@@ -24,28 +25,35 @@ export class game_ui extends ui.game_uiUI implements UI_Interface {
         this.on(Laya.Event.MOUSE_OUT, this, this.OnClickUp);
     }
 
-    private isdown=false;
+    private isdown = false;
     OnClickDown(e: Laya.Event) {
         if (e.target instanceof Laya.UIComponent) return;
-        this.isdown=true;
+        if (!GameController.Instance.gameStart || GameController.Instance.gameover) return;
+        this.isdown = true;
         this.on(Laya.Event.MOUSE_MOVE, this, this.OnSlider);
-        this.curMousePos = new Laya.Vector2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
+        this.curMousePos = new Vector3(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
+
+        this.startPos = this.curMousePos.clone();
+        this.MouseD();
     }
     OnClickUp() {
-        if(!this.isdown)return;
-        this.isdown=false;
+        if (!this.isdown) return;
+        if (!GameController.Instance.gameStart || GameController.Instance.gameover) return;
+        this.isdown = false;
         this.off(Laya.Event.MOUSE_MOVE, this, this.OnSlider);
+        this.endPos = this.curMousePos.clone();
+        this.MouseU();
     }
 
-    curMousePos: Laya.Vector2;
+    curMousePos: Vector3;
     OnSlider() {
-        var MousePos = new Laya.Vector2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
+        var MousePos = new Vector3(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
         var offestX = MousePos.x - this.curMousePos.x;
         if (offestX > 0) offestX = offestX < 5 ? offestX : 5;
         if (offestX < 0) offestX = offestX > -5 ? offestX : -5;
-        var rotateDir = new Laya.Vector3(0, -offestX * 0.01, 0);
+        var rotateDir = new Vector3(0, -offestX * 0.01, 0);
         RoleController.Instance.RoleRotation(rotateDir);
-        this.curMousePos = new Laya.Vector2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);;
+        this.curMousePos = new Vector3(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);;
     }
     OnClose() {
         EventManager.off(Laya.Event.RESIZE, this, this.resizeHander);
@@ -53,4 +61,24 @@ export class game_ui extends ui.game_uiUI implements UI_Interface {
         this.off(Laya.Event.MOUSE_UP, this, this.OnClickUp);
         this.off(Laya.Event.MOUSE_OUT, this, this.OnClickUp);
     }
+
+
+    //点击的判断
+    private startPos;
+    private isexceed = false;
+    private MouseD() {
+        this.isexceed = false;
+        Laya.timer.once(500, this, () => {
+            this.isexceed = true;
+        });
+    }
+    private endPos;
+    private MouseU() {
+        var dis = Vector3.distance(this.startPos, this.endPos);
+        if (dis > 30 || this.isexceed) {
+            return;
+        } else {
+            GameController.Instance.Hit();
+        }
+    }
 }

+ 34 - 0
ShootLaya/src/game_ui/main_ui.ts

@@ -0,0 +1,34 @@
+import { ui } from "../ui/layaMaxUI";
+import { EventManager } from "../game_module/EventManager";
+import ViewManager, { ViewType } from "../game_logic/ViewManager";
+import { GameController } from "../game_logic/GameController";
+
+
+export class main_ui extends ui.main_uiUI implements UI_Interface {
+
+    constructor() {
+        super();
+        this.resizeHander();
+        EventManager.on(Laya.Event.RESIZE, this, this.resizeHander);
+    }
+
+    OnShow(data?: any) {
+        this.ButtonClickHandle();
+    }
+
+    resizeHander() {
+        this.height = Laya.stage.height;
+    }
+
+
+    ButtonClickHandle() {
+        this.start_btn._mclickHandler = () => {
+
+            ViewManager.Instance.OpenView(ViewType.game_ui);
+            GameController.Instance.GameStart();
+        };
+    }
+    OnClose() {
+        this.start_btn.ClearRunTime();
+    }
+}

+ 11 - 1
ShootLaya/src/ui/layaMaxUI.ts

@@ -5,7 +5,7 @@ import Scene=Laya.Scene;
 var REG: Function = Laya.ClassUtils.regClass;
 export module ui {
     export class game_uiUI extends Scene {
-        public static  uiView:any ={"type":"Scene","props":{"width":720,"height":1280},"loadList":[],"loadList3D":[]};
+        public static  uiView:any ={"type":"Scene","props":{"zOrder":1,"width":720,"height":1280},"compId":2,"loadList":[],"loadList3D":[]};
         constructor(){ super()}
         createChildren():void {
             super.createChildren();
@@ -13,4 +13,14 @@ export module ui {
         }
     }
     REG("ui.game_uiUI",game_uiUI);
+    export class main_uiUI extends Scene {
+		public start_btn:any;
+        public static  uiView:any ={"type":"Scene","props":{"zOrder":1,"width":720,"height":1280},"compId":2,"child":[{"type":"Image","props":{"y":640,"x":360,"var":"start_btn","skin":"main_res/jiemian_xin_1_1.png","runtime":"game_ui/RunTimeScript/ButtonRunTime.ts","centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},"compId":3}],"loadList":["main_res/jiemian_xin_1_1.png"],"loadList3D":[]};
+        constructor(){ super()}
+        createChildren():void {
+            super.createChildren();
+            this.createView(main_uiUI.uiView);
+        }
+    }
+    REG("ui.main_uiUI",main_uiUI);
 }

BIN
Shootunity/.vs/Shootunity/v16/.suo


+ 0 - 0
Shootunity/.vs/Shootunity/v16/Server/sqlite3/db.lock


BIN
Shootunity/.vs/Shootunity/v16/Server/sqlite3/storage.ide


+ 10 - 5
Shootunity/Assembly-CSharp.csproj

@@ -6,7 +6,7 @@
     <ProductVersion>10.0.20506</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <RootNamespace></RootNamespace>
-    <ProjectGuid>{B1D60D71-6F07-A6A0-B2D2-3327909400BE}</ProjectGuid>
+    <ProjectGuid>{8355C705-E538-E6B1-2BDD-720931F795DE}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <AssemblyName>Assembly-CSharp</AssemblyName>
@@ -60,6 +60,11 @@
      <Compile Include="Assets\LayaAir3D\LayaTool\Util\JSONObject.cs" />
      <Compile Include="Assets\LayaAir3D\LayaTool\Util\MathUtil.cs" />
      <Compile Include="Assets\LayaAir3D\LayaTool\Util\TextureUtil.cs" />
+     <Compile Include="Assets\TestData\Bullet.cs" />
+     <Compile Include="Assets\TestData\GameController.cs" />
+     <Compile Include="Assets\TestData\Moster.cs" />
+     <Compile Include="Assets\TestData\OutPointManager.cs" />
+     <Compile Include="Assets\TestData\Player.cs" />
      <None Include="Assets\LayaAir3D\LayaShader\LayaShader\LayaPBRSpecular.shader" />
      <None Include="Assets\LayaAir3D\LayaShader\CGIncludes\LayaPBRStandardFA.cginc" />
      <None Include="Assets\LayaAir3D\LayaShader\LayaShader\LayaUnlit.shader" />
@@ -105,11 +110,11 @@
  <Reference Include="UnityEngine.VR">
  <HintPath>D:/Unity5.6.5/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/RuntimeEditor/UnityEngine.VR.dll</HintPath>
  </Reference>
- <Reference Include="zxing.unity">
- <HintPath>E:/Work/ShootOut/Shoot/Assets/LayaAir3D/LayaTool/Util/zxing.unity.dll</HintPath>
- </Reference>
  <Reference Include="LayaAirLibrary">
- <HintPath>E:/Work/ShootOut/Shoot/Assets/LayaAir3D/LayaTool/LayaAirLibrary.dll</HintPath>
+ <HintPath>E:/Work/ShootOut3D/Shootout/Shootunity/Assets/LayaAir3D/LayaTool/LayaAirLibrary.dll</HintPath>
+ </Reference>
+ <Reference Include="zxing.unity">
+ <HintPath>E:/Work/ShootOut3D/Shootout/Shootunity/Assets/LayaAir3D/LayaTool/Util/zxing.unity.dll</HintPath>
  </Reference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 9 - 0
Shootunity/Assets/CrackRes.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 4bfc20fc27012b44fb4f018d1c01c379
+folderAsset: yes
+timeCreated: 1564537773
+licenseType: Pro
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Shootunity/Assets/CrackRes/Black.png


+ 68 - 0
Shootunity/Assets/CrackRes/Black.png.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: c7a8d7347b88d92458a87abbe19c6061
+timeCreated: 1564565728
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 0
Shootunity/Assets/CrackRes/Levels.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 5cf4f030a4e92c04eb2544e825ed16ac
+folderAsset: yes
+timeCreated: 1564541840
+licenseType: Pro
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Shootunity/Assets/CrackRes/Levels/Black.png


+ 68 - 0
Shootunity/Assets/CrackRes/Levels/Black.png.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: 34f1c4c0ac9fe984ca0759b1657de203
+timeCreated: 1564541846
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Shootunity/Assets/CrackRes/Levels/Facialhair.png


+ 68 - 0
Shootunity/Assets/CrackRes/Levels/Facialhair.png.meta

@@ -0,0 +1,68 @@
+fileFormatVersion: 2
+guid: 487876d12f8751845a81f832dad2be33
+timeCreated: 1564561207
+licenseType: Pro
+TextureImporter:
+  fileIDToRecycleName: {}
+  serializedVersion: 4
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    filterMode: -1
+    aniso: -1
+    mipBias: -1
+    wrapMode: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spritePixelsToUnits: 100
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  platformSettings:
+  - buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+  spritePackingTag: 
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 0
Shootunity/Assets/CrackRes/Levels/Materials.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 635c34a4f16821940bee86b94fb02bda
+folderAsset: yes
+timeCreated: 1564541848
+licenseType: Pro
+DefaultImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Shootunity/Assets/New Material.mat


+ 9 - 0
Shootunity/Assets/CrackRes/Levels/Materials/Facialhair.mat.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 9dd246f794ad29140aef27bbea84f64a
+timeCreated: 1564541848
+licenseType: Pro
+NativeFormatImporter:
+  mainObjectFileID: 2100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Shootunity/Assets/New Material 1.mat


+ 9 - 0
Shootunity/Assets/CrackRes/Levels/Materials/Glasses.mat.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 0a6a2350f5fd1904a9cc344b2f562f33
+timeCreated: 1564541848
+licenseType: Pro
+NativeFormatImporter:
+  mainObjectFileID: 2100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Shootunity/Assets/CrackRes/Levels/Materials/Gray.mat


+ 9 - 0
Shootunity/Assets/CrackRes/Levels/Materials/Gray.mat.meta

@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 2c58570157211b647b7262cf5cbf214e
+timeCreated: 1564541848
+licenseType: Pro
+NativeFormatImporter:
+  mainObjectFileID: 2100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 0 - 0
Shootunity/Assets/CrackRes/Levels/Materials/Texture01.mat


Vissa filer visades inte eftersom för många filer har ändrats