Преглед изворни кода

添加瞄准线,增加射箭逻辑

zhaochengyang пре 5 година
родитељ
комит
89183eb90f
47 измењених фајлова са 763 додато и 748 уклоњено
  1. 11 0
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/0f4bab1757f5d47a3e5e0903bc2ebaddf9b78392
  2. 0 9
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/27bdf9f392aeea33763fc7c0466a44a51ce66d7f
  3. 2 2
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/2c87bb0d896145d839e70e90a02543e75d850647
  4. 2 2
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/80ed0f7069a48ab13c561149878669bcdcc06e07
  5. 0 5
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/88b04293695c597ef97104e2d5e3760c449eda27
  6. 0 11
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/8f9e06b1101d5ceebc4361e64219f591c8b410e2
  7. 5 0
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/b37cf8c6ece3cc969e2f5c21c4bfda9feb547993
  8. 11 0
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/b99ed32b5daec0d479e05454f1e21aeda28b1d3c
  9. 2 2
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/60f9f2093b63f8329535f1f5b40ffaa3b1dd75a3
  10. 9 0
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/dd24dc01d3844eeff2505c07f11c6afeb107340c
  11. 0 9
      .rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/fe7a6bcf4b3ed9070cffa1b1d974a2f1570bdec4
  12. BIN
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/ArcherAsset/Texture2D/grass.jpg
  13. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Archer.lmat
  14. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Fence_Classic.lmat
  15. 72 0
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Grass.lmat
  16. 0 58
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Green.lmat
  17. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Logs.lmat
  18. 27 10
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Blue.lmat
  19. 0 58
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Red.lmat
  20. 12 15
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Stone.lmat
  21. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree-Beech.lmat
  22. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree_Bonsai.lmat
  23. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree_Lime.lmat
  24. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree_Oak.lmat
  25. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Wood_Metal.lmat
  26. 13 16
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/barrIcade_Tank.lmat
  27. BIN
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/assist-Box001.lm
  28. BIN
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/grass-grass_0.lm
  29. BIN
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/textures/ray.png
  30. BIN
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Library/unity default resources-Cylinder.lm
  31. 69 176
      bin/Game/res/Prop/LayaScene_Prop/Conventional/Prop.lh
  32. 13 16
      bin/Game/res/Role/LayaScene_Role/Conventional/Assets/ArcherAsset/Animator/Horse/Materials/Horse_ORG_1k.lmat
  33. 12 15
      bin/Game/res/Role/LayaScene_Role/Conventional/Assets/ArcherAsset/Animator/Ragdoll _5741/Materials/ragdoll.lmat
  34. 12 15
      bin/Game/res/Role/LayaScene_Role/Conventional/Assets/ArcherAsset/Animator/Ragdoll/Materials/player.lmat
  35. 0 1
      bin/Game/res/Role/LayaScene_Role/Conventional/Horse.lh
  36. 109 110
      bin/Game/res/Role/LayaScene_Role/Conventional/enemy.lh
  37. 57 2
      bin/Game/res/Role/LayaScene_Role/Conventional/player.lh
  38. 109 61
      bin/js/bundle.js
  39. 1 1
      bin/js/bundle.js.map
  40. 2 2
      bin/libs/laya.d3.js
  41. 37 9
      src/Game/GameManager.ts
  42. 1 0
      src/Game/PlayerControl.ts
  43. 55 2
      src/Game/Runner.ts
  44. 1 1
      src/GameConfig.ts
  45. 2 6
      src/Tools/AssetManager.ts
  46. 13 0
      src/Tools/GameTools.ts
  47. 0 6
      src/View/LoadView.ts

Разлика између датотеке није приказан због своје велике величине
+ 11 - 0
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/0f4bab1757f5d47a3e5e0903bc2ebaddf9b78392


Разлика између датотеке није приказан због своје велике величине
+ 0 - 9
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/27bdf9f392aeea33763fc7c0466a44a51ce66d7f


Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/2c87bb0d896145d839e70e90a02543e75d850647


Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/80ed0f7069a48ab13c561149878669bcdcc06e07


Разлика између датотеке није приказан због своје велике величине
+ 0 - 5
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/88b04293695c597ef97104e2d5e3760c449eda27


Разлика између датотеке није приказан због своје велике величине
+ 0 - 11
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/8f9e06b1101d5ceebc4361e64219f591c8b410e2


Разлика између датотеке није приказан због своје велике величине
+ 5 - 0
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/b37cf8c6ece3cc969e2f5c21c4bfda9feb547993


Разлика између датотеке није приказан због своје велике величине
+ 11 - 0
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/b99ed32b5daec0d479e05454f1e21aeda28b1d3c


Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/60f9f2093b63f8329535f1f5b40ffaa3b1dd75a3


Разлика између датотеке није приказан због своје велике величине
+ 9 - 0
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/dd24dc01d3844eeff2505c07f11c6afeb107340c


Разлика између датотеке није приказан због своје велике величине
+ 0 - 9
.rpt2_cache/rpt2_817333419d54cf6abb96f886dff7a88eb3cc0b8d/code/cache/fe7a6bcf4b3ed9070cffa1b1d974a2f1570bdec4


BIN
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/ArcherAsset/Texture2D/grass.jpg


+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Archer.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Fence_Classic.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 72 - 0
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Grass.lmat

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

+ 0 - 58
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Green.lmat

@@ -1,58 +0,0 @@
-{
-	"version":"LAYAMATERIAL:02",
-	"props":{
-		"type":"Laya.BlinnPhongMaterial",
-		"name":"Green",
-		"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.06855918,
-					0.9926471,
-					0,
-					1
-				]
-			},
-			{
-				"name":"emissionColor",
-				"value":[
-					0,
-					0,
-					0,
-					1
-				]
-			}
-		],
-		"defines":[]
-	}
-}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Logs.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 27 - 10
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Blue.lmat

@@ -2,28 +2,45 @@
 	"version":"LAYAMATERIAL:02",
 	"props":{
 		"type":"Laya.BlinnPhongMaterial",
-		"name":"Blue",
+		"name":"Ray",
 		"renderStates":[
 			{
 				"cull":2,
-				"blend":0,
-				"srcBlend":1,
-				"dstBlend":0,
-				"depthWrite":true,
+				"blend":1,
+				"srcBlend":770,
+				"dstBlend":771,
+				"depthWrite":false,
 				"depthTest":515
 			}
 		],
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
+		"renderQueue":3000,
 		"metallic":0,
-		"smoothness":0.5,
+		"smoothness":0,
 		"smoothnessTextureScale":1,
 		"smoothnessSource":0,
 		"normalTextureScale":1,
 		"parallaxTextureScale":0.02,
 		"occlusionTextureStrength":1,
-		"textures":[],
+		"textures":[
+			{
+				"name":"albedoTexture",
+				"path":"../../textures/ray.png",
+				"constructParams":[
+					512,
+					512,
+					1,
+					true
+				],
+				"propertyParams":{
+					"filterMode":1,
+					"wrapModeU":0,
+					"wrapModeV":0,
+					"anisoLevel":1
+				}
+			}
+		],
 		"vectors":[
 			{
 				"name":"tilingOffset",
@@ -37,8 +54,8 @@
 			{
 				"name":"albedoColor",
 				"value":[
-					0,
-					0.1675516,
+					1,
+					1,
 					1,
 					1
 				]

+ 0 - 58
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Red.lmat

@@ -1,58 +0,0 @@
-{
-	"version":"LAYAMATERIAL:02",
-	"props":{
-		"type":"Laya.BlinnPhongMaterial",
-		"name":"Red",
-		"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.9926471,
-					0.02919553,
-					0.02919553,
-					1
-				]
-			},
-			{
-				"name":"emissionColor",
-				"value":[
-					0,
-					0,
-					0,
-					1
-				]
-			}
-		],
-		"defines":[]
-	}
-}

+ 12 - 15
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Stone.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
 		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					0.7205882,
+					0.7205882,
+					0.7205882,
 					1
 				]
 			}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree-Beech.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree_Bonsai.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree_Lime.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Tree_Oak.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/Wood_Metal.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 13 - 16
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/Materials/barrIcade_Tank.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

BIN
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/assist-Box001.lm


BIN
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/new_model/grass-grass_0.lm


BIN
bin/Game/res/Prop/LayaScene_Prop/Conventional/Assets/textures/ray.png


BIN
bin/Game/res/Prop/LayaScene_Prop/Conventional/Library/unity default resources-Cylinder.lm


+ 69 - 176
bin/Game/res/Prop/LayaScene_Prop/Conventional/Prop.lh

@@ -106,7 +106,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -171,7 +170,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -236,7 +234,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -301,7 +298,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -366,7 +362,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -431,7 +426,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -496,7 +490,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -561,7 +554,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -626,7 +618,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Stone.lmat"
 										}
 									]
@@ -720,7 +711,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Tree-Beech.lmat"
 										}
 									]
@@ -785,7 +775,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Tree_Bonsai.lmat"
 										}
 									]
@@ -850,7 +839,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Tree_Lime.lmat"
 										}
 									]
@@ -915,7 +903,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Tree_Oak.lmat"
 										}
 									]
@@ -982,7 +969,6 @@
 							"enableRender":true,
 							"materials":[
 								{
-									"type":"Laya.BlinnPhongMaterial",
 									"path":"Assets/new_model/Materials/Fence_Classic.lmat"
 								}
 							]
@@ -1052,7 +1038,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Fence_Classic.lmat"
 										}
 									]
@@ -1117,7 +1102,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/Logs.lmat"
 										}
 									]
@@ -1182,7 +1166,6 @@
 									"enableRender":true,
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/new_model/Materials/barrIcade_Tank.lmat"
 										}
 									]
@@ -1214,13 +1197,12 @@
 							"scale":[
 								1,
 								1,
-								1
+								2
 							],
 							"meshPath":"Assets/new_model/wood_metal-wood_metal_0.lm",
 							"enableRender":true,
 							"materials":[
 								{
-									"type":"Laya.BlinnPhongMaterial",
 									"path":"Assets/new_model/Materials/Wood_Metal.lmat"
 								}
 							]
@@ -1263,7 +1245,6 @@
 							"enableRender":true,
 							"materials":[
 								{
-									"type":"Laya.BlinnPhongMaterial",
 									"path":"Assets/new_model/Materials/Archer.lmat"
 								}
 							]
@@ -1277,200 +1258,112 @@
 							}
 						],
 						"child":[]
-					}
-				]
-			},
-			{
-				"type":"Sprite3D",
-				"instanceID":39,
-				"props":{
-					"name":"bulletB",
-					"active":true,
-					"isStatic":false,
-					"layer":0,
-					"position":[
-						0,
-						0,
-						0
-					],
-					"rotation":[
-						0,
-						0,
-						0,
-						-1
-					],
-					"scale":[
-						1,
-						1,
-						1
-					]
-				},
-				"components":[],
-				"child":[
+					},
 					{
-						"type":"MeshSprite3D",
-						"instanceID":40,
+						"type":"Sprite3D",
+						"instanceID":39,
 						"props":{
-							"name":"Cylinder",
+							"name":"grass",
 							"active":true,
 							"isStatic":false,
 							"layer":0,
 							"position":[
-								0,
-								0,
-								0.5
+								4.903,
+								14.076,
+								40.558
 							],
 							"rotation":[
-								-0.7071068,
 								0,
 								0,
-								-0.7071068
-							],
-							"scale":[
-								0.04,
-								0.5,
-								0.04
-							],
-							"meshPath":"Library/unity default resources-Cylinder.lm",
-							"enableRender":true,
-							"materials":[
-								{
-									"type":"Laya.BlinnPhongMaterial",
-									"path":"Assets/new_model/Materials/Blue.lmat"
-								}
-							]
-						},
-						"components":[],
-						"child":[]
-					}
-				]
-			},
-			{
-				"type":"Sprite3D",
-				"instanceID":41,
-				"props":{
-					"name":"bulletG",
-					"active":true,
-					"isStatic":false,
-					"layer":0,
-					"position":[
-						-1.1,
-						1.68,
-						-6.49
-					],
-					"rotation":[
-						0,
-						-0.7113516,
-						0,
-						-0.7028363
-					],
-					"scale":[
-						1,
-						1,
-						1
-					]
-				},
-				"components":[],
-				"child":[
-					{
-						"type":"MeshSprite3D",
-						"instanceID":42,
-						"props":{
-							"name":"Cylinder",
-							"active":true,
-							"isStatic":false,
-							"layer":0,
-							"position":[
-								-5.98,
-								-1.69,
-								0.5
-							],
-							"rotation":[
-								-0.7071068,
 								0,
-								0,
-								-0.7071068
+								-1
 							],
 							"scale":[
-								0.04,
-								0.5,
-								0.04
-							],
-							"meshPath":"Library/unity default resources-Cylinder.lm",
-							"enableRender":true,
-							"materials":[
-								{
-									"type":"Laya.BlinnPhongMaterial",
-									"path":"Assets/new_model/Materials/Green.lmat"
-								}
+								1,
+								1,
+								1
 							]
 						},
 						"components":[],
-						"child":[]
-					}
-				]
-			},
-			{
-				"type":"Sprite3D",
-				"instanceID":43,
-				"props":{
-					"name":"bulletR",
-					"active":true,
-					"isStatic":false,
-					"layer":0,
-					"position":[
-						-1.034,
-						0.007,
-						-0.951
-					],
-					"rotation":[
-						0,
-						-0.7113516,
-						0,
-						-0.7028363
-					],
-					"scale":[
-						1,
-						1,
-						1
-					]
-				},
-				"components":[],
-				"child":[
+						"child":[
+							{
+								"type":"MeshSprite3D",
+								"instanceID":40,
+								"props":{
+									"name":"grass_0",
+									"active":true,
+									"isStatic":false,
+									"layer":0,
+									"position":[
+										0,
+										0,
+										0
+									],
+									"rotation":[
+										0,
+										0,
+										0,
+										-1
+									],
+									"scale":[
+										1,
+										1,
+										1
+									],
+									"meshPath":"Assets/new_model/grass-grass_0.lm",
+									"enableRender":true,
+									"materials":[
+										{
+											"path":"Assets/new_model/Materials/Grass.lmat"
+										}
+									]
+								},
+								"components":[],
+								"child":[]
+							}
+						]
+					},
 					{
 						"type":"MeshSprite3D",
-						"instanceID":44,
+						"instanceID":41,
 						"props":{
-							"name":"Cylinder",
+							"name":"assist",
 							"active":true,
 							"isStatic":false,
 							"layer":0,
 							"position":[
-								0,
-								0,
-								0.5
+								11.73,
+								13.75192,
+								47.765
 							],
 							"rotation":[
-								-0.7071068,
+								0.7071068,
 								0,
 								0,
 								-0.7071068
 							],
 							"scale":[
-								0.04,
-								0.5,
-								0.04
+								1,
+								1,
+								1
 							],
-							"meshPath":"Library/unity default resources-Cylinder.lm",
+							"meshPath":"Assets/new_model/assist-Box001.lm",
 							"enableRender":true,
 							"materials":[
 								{
 									"type":"Laya.BlinnPhongMaterial",
-									"path":"Assets/new_model/Materials/Red.lmat"
+									"path":"Assets/new_model/Materials/Ray.lmat"
 								}
 							]
 						},
-						"components":[],
+						"components":[
+							{
+								"type":"Animator",
+								"layers":[],
+								"cullingMode":0,
+								"playOnWake":true
+							}
+						],
 						"child":[]
 					}
 				]

+ 13 - 16
bin/Game/res/Role/LayaScene_Role/Conventional/Assets/ArcherAsset/Animator/Horse/Materials/Horse_ORG_1k.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[
 			{
 				"name":"albedoTexture",
@@ -52,20 +49,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					1,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
-					0,
+					1,
+					1,
+					1,
 					1
 				]
 			}

+ 12 - 15
bin/Game/res/Role/LayaScene_Role/Conventional/Assets/ArcherAsset/Animator/Ragdoll _5741/Materials/ragdoll.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[],
 		"vectors":[
 			{
@@ -35,19 +32,19 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					1,
-					0.5834956,
-					0,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
-					0,
-					0,
+					1,
+					0.5834956,
 					0,
 					1
 				]

+ 12 - 15
bin/Game/res/Role/LayaScene_Role/Conventional/Assets/ArcherAsset/Animator/Ragdoll/Materials/player.lmat

@@ -13,16 +13,13 @@
 				"depthTest":515
 			}
 		],
+		"enableVertexColor":false,
 		"alphaTest":false,
 		"alphaTestValue":0.5,
-		"renderQueue":2000,
-		"metallic":0,
-		"smoothness":0.5,
-		"smoothnessTextureScale":1,
-		"smoothnessSource":0,
-		"normalTextureScale":1,
-		"parallaxTextureScale":0.02,
-		"occlusionTextureStrength":1,
+		"renderQueue":3000,
+		"albedoIntensity":1,
+		"enableLighting":true,
+		"shininess":0.078125,
 		"textures":[],
 		"vectors":[
 			{
@@ -35,20 +32,20 @@
 				]
 			},
 			{
-				"name":"albedoColor",
+				"name":"specularColor",
 				"value":[
-					0,
-					0.5290742,
-					1,
+					0.5,
+					0.5,
+					0.5,
 					1
 				]
 			},
 			{
-				"name":"emissionColor",
+				"name":"albedoColor",
 				"value":[
 					0,
-					0,
-					0,
+					0.5290742,
+					1,
 					1
 				]
 			}

+ 0 - 1
bin/Game/res/Role/LayaScene_Role/Conventional/Horse.lh

@@ -236,7 +236,6 @@
 											],
 											"materials":[
 												{
-													"type":"Laya.BlinnPhongMaterial",
 													"path":"Assets/ArcherAsset/Animator/Horse/Materials/Horse_ORG_1k.lmat"
 												}
 											],

+ 109 - 110
bin/Game/res/Role/LayaScene_Role/Conventional/enemy.lh

@@ -2,7 +2,7 @@
 	"version":"LAYAHIERARCHY:02",
 	"data":{
 		"type":"Sprite3D",
-		"instanceID":130,
+		"instanceID":132,
 		"props":{
 			"name":"enemy",
 			"active":true,
@@ -36,7 +36,7 @@
 		"child":[
 			{
 				"type":"Sprite3D",
-				"instanceID":131,
+				"instanceID":133,
 				"props":{
 					"name":"Ragdoll",
 					"active":true,
@@ -63,7 +63,7 @@
 				"child":[
 					{
 						"type":"Sprite3D",
-						"instanceID":132,
+						"instanceID":134,
 						"props":{
 							"name":"Bip001",
 							"active":true,
@@ -90,7 +90,7 @@
 						"child":[
 							{
 								"type":"Sprite3D",
-								"instanceID":133,
+								"instanceID":135,
 								"props":{
 									"name":"Bip001 Footsteps",
 									"active":true,
@@ -118,7 +118,7 @@
 							},
 							{
 								"type":"Sprite3D",
-								"instanceID":134,
+								"instanceID":136,
 								"props":{
 									"name":"Bip001 Pelvis",
 									"active":true,
@@ -145,7 +145,7 @@
 								"child":[
 									{
 										"type":"Sprite3D",
-										"instanceID":135,
+										"instanceID":137,
 										"props":{
 											"name":"Bip001 Spine",
 											"active":true,
@@ -172,7 +172,7 @@
 										"child":[
 											{
 												"type":"Sprite3D",
-												"instanceID":136,
+												"instanceID":138,
 												"props":{
 													"name":"Bip001 L Thigh",
 													"active":true,
@@ -199,7 +199,7 @@
 												"child":[
 													{
 														"type":"Sprite3D",
-														"instanceID":137,
+														"instanceID":139,
 														"props":{
 															"name":"Bip001 L Calf",
 															"active":true,
@@ -226,7 +226,7 @@
 														"child":[
 															{
 																"type":"Sprite3D",
-																"instanceID":138,
+																"instanceID":140,
 																"props":{
 																	"name":"Bip001 L Foot",
 																	"active":true,
@@ -253,7 +253,7 @@
 																"child":[
 																	{
 																		"type":"Sprite3D",
-																		"instanceID":139,
+																		"instanceID":141,
 																		"props":{
 																			"name":"Bip001 L Toe0",
 																			"active":true,
@@ -280,7 +280,7 @@
 																		"child":[
 																			{
 																				"type":"Sprite3D",
-																				"instanceID":140,
+																				"instanceID":142,
 																				"props":{
 																					"name":"Bip001 L Toe0Nub",
 																					"active":true,
@@ -316,7 +316,7 @@
 											},
 											{
 												"type":"Sprite3D",
-												"instanceID":141,
+												"instanceID":143,
 												"props":{
 													"name":"Bip001 R Thigh",
 													"active":true,
@@ -343,7 +343,7 @@
 												"child":[
 													{
 														"type":"Sprite3D",
-														"instanceID":142,
+														"instanceID":144,
 														"props":{
 															"name":"Bip001 R Calf",
 															"active":true,
@@ -370,7 +370,7 @@
 														"child":[
 															{
 																"type":"Sprite3D",
-																"instanceID":143,
+																"instanceID":145,
 																"props":{
 																	"name":"Bip001 R Foot",
 																	"active":true,
@@ -397,7 +397,7 @@
 																"child":[
 																	{
 																		"type":"Sprite3D",
-																		"instanceID":144,
+																		"instanceID":146,
 																		"props":{
 																			"name":"Bip001 R Toe0",
 																			"active":true,
@@ -424,7 +424,7 @@
 																		"child":[
 																			{
 																				"type":"Sprite3D",
-																				"instanceID":145,
+																				"instanceID":147,
 																				"props":{
 																					"name":"Bip001 R Toe0Nub",
 																					"active":true,
@@ -460,7 +460,7 @@
 											},
 											{
 												"type":"Sprite3D",
-												"instanceID":146,
+												"instanceID":148,
 												"props":{
 													"name":"Bip001 Spine1",
 													"active":true,
@@ -487,7 +487,7 @@
 												"child":[
 													{
 														"type":"Sprite3D",
-														"instanceID":147,
+														"instanceID":149,
 														"props":{
 															"name":"Bip001 Spine2",
 															"active":true,
@@ -514,7 +514,7 @@
 														"child":[
 															{
 																"type":"Sprite3D",
-																"instanceID":148,
+																"instanceID":150,
 																"props":{
 																	"name":"Bip001 Neck",
 																	"active":true,
@@ -541,7 +541,7 @@
 																"child":[
 																	{
 																		"type":"Sprite3D",
-																		"instanceID":149,
+																		"instanceID":151,
 																		"props":{
 																			"name":"Bip001 Head",
 																			"active":true,
@@ -568,7 +568,7 @@
 																		"child":[
 																			{
 																				"type":"Sprite3D",
-																				"instanceID":150,
+																				"instanceID":152,
 																				"props":{
 																					"name":"Bip001 HeadNub",
 																					"active":true,
@@ -598,7 +598,7 @@
 																	},
 																	{
 																		"type":"Sprite3D",
-																		"instanceID":151,
+																		"instanceID":153,
 																		"props":{
 																			"name":"Bip001 L Clavicle",
 																			"active":true,
@@ -625,7 +625,7 @@
 																		"child":[
 																			{
 																				"type":"Sprite3D",
-																				"instanceID":152,
+																				"instanceID":154,
 																				"props":{
 																					"name":"Bip001 L UpperArm",
 																					"active":true,
@@ -652,7 +652,7 @@
 																				"child":[
 																					{
 																						"type":"Sprite3D",
-																						"instanceID":153,
+																						"instanceID":155,
 																						"props":{
 																							"name":"Bip001 L Forearm",
 																							"active":true,
@@ -679,7 +679,7 @@
 																						"child":[
 																							{
 																								"type":"Sprite3D",
-																								"instanceID":154,
+																								"instanceID":156,
 																								"props":{
 																									"name":"Bip001 L Hand",
 																									"active":true,
@@ -706,7 +706,7 @@
 																								"child":[
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":155,
+																										"instanceID":157,
 																										"props":{
 																											"name":"Bip001 L Finger0",
 																											"active":true,
@@ -733,7 +733,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":156,
+																												"instanceID":158,
 																												"props":{
 																													"name":"Bip001 L Finger01",
 																													"active":true,
@@ -760,7 +760,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":157,
+																														"instanceID":159,
 																														"props":{
 																															"name":"Bip001 L Finger02",
 																															"active":true,
@@ -787,7 +787,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":158,
+																																"instanceID":160,
 																																"props":{
 																																	"name":"Bip001 L Finger0Nub",
 																																	"active":true,
@@ -821,7 +821,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":159,
+																										"instanceID":161,
 																										"props":{
 																											"name":"Bip001 L Finger1",
 																											"active":true,
@@ -848,7 +848,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":160,
+																												"instanceID":162,
 																												"props":{
 																													"name":"Bip001 L Finger11",
 																													"active":true,
@@ -875,7 +875,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":161,
+																														"instanceID":163,
 																														"props":{
 																															"name":"Bip001 L Finger12",
 																															"active":true,
@@ -902,7 +902,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":162,
+																																"instanceID":164,
 																																"props":{
 																																	"name":"Bip001 L Finger1Nub",
 																																	"active":true,
@@ -936,7 +936,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":163,
+																										"instanceID":165,
 																										"props":{
 																											"name":"Bip001 L Finger2",
 																											"active":true,
@@ -963,7 +963,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":164,
+																												"instanceID":166,
 																												"props":{
 																													"name":"Bip001 L Finger21",
 																													"active":true,
@@ -990,7 +990,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":165,
+																														"instanceID":167,
 																														"props":{
 																															"name":"Bip001 L Finger22",
 																															"active":true,
@@ -1017,7 +1017,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":166,
+																																"instanceID":168,
 																																"props":{
 																																	"name":"Bip001 L Finger2Nub",
 																																	"active":true,
@@ -1051,7 +1051,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":167,
+																										"instanceID":169,
 																										"props":{
 																											"name":"Bip001 L Finger3",
 																											"active":true,
@@ -1078,7 +1078,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":168,
+																												"instanceID":170,
 																												"props":{
 																													"name":"Bip001 L Finger31",
 																													"active":true,
@@ -1105,7 +1105,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":169,
+																														"instanceID":171,
 																														"props":{
 																															"name":"Bip001 L Finger32",
 																															"active":true,
@@ -1132,7 +1132,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":170,
+																																"instanceID":172,
 																																"props":{
 																																	"name":"Bip001 L Finger3Nub",
 																																	"active":true,
@@ -1166,7 +1166,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":171,
+																										"instanceID":173,
 																										"props":{
 																											"name":"Bip001 L Finger4",
 																											"active":true,
@@ -1193,7 +1193,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":172,
+																												"instanceID":174,
 																												"props":{
 																													"name":"Bip001 L Finger41",
 																													"active":true,
@@ -1220,7 +1220,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":173,
+																														"instanceID":175,
 																														"props":{
 																															"name":"Bip001 L Finger42",
 																															"active":true,
@@ -1247,7 +1247,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":174,
+																																"instanceID":176,
 																																"props":{
 																																	"name":"Bip001 L Finger4Nub",
 																																	"active":true,
@@ -1289,7 +1289,7 @@
 																	},
 																	{
 																		"type":"Sprite3D",
-																		"instanceID":175,
+																		"instanceID":177,
 																		"props":{
 																			"name":"Bip001 R Clavicle",
 																			"active":true,
@@ -1316,7 +1316,7 @@
 																		"child":[
 																			{
 																				"type":"Sprite3D",
-																				"instanceID":176,
+																				"instanceID":178,
 																				"props":{
 																					"name":"Bip001 R UpperArm",
 																					"active":true,
@@ -1343,7 +1343,7 @@
 																				"child":[
 																					{
 																						"type":"Sprite3D",
-																						"instanceID":177,
+																						"instanceID":179,
 																						"props":{
 																							"name":"Bip001 R Forearm",
 																							"active":true,
@@ -1370,7 +1370,7 @@
 																						"child":[
 																							{
 																								"type":"Sprite3D",
-																								"instanceID":178,
+																								"instanceID":180,
 																								"props":{
 																									"name":"Bip001 R Hand",
 																									"active":true,
@@ -1397,7 +1397,7 @@
 																								"child":[
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":179,
+																										"instanceID":181,
 																										"props":{
 																											"name":"Bip001 R Finger0",
 																											"active":true,
@@ -1424,7 +1424,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":180,
+																												"instanceID":182,
 																												"props":{
 																													"name":"Bip001 R Finger01",
 																													"active":true,
@@ -1451,7 +1451,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":181,
+																														"instanceID":183,
 																														"props":{
 																															"name":"Bip001 R Finger02",
 																															"active":true,
@@ -1478,7 +1478,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":182,
+																																"instanceID":184,
 																																"props":{
 																																	"name":"Bip001 R Finger0Nub",
 																																	"active":true,
@@ -1512,7 +1512,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":183,
+																										"instanceID":185,
 																										"props":{
 																											"name":"Bip001 R Finger1",
 																											"active":true,
@@ -1539,7 +1539,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":184,
+																												"instanceID":186,
 																												"props":{
 																													"name":"Bip001 R Finger11",
 																													"active":true,
@@ -1566,7 +1566,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":185,
+																														"instanceID":187,
 																														"props":{
 																															"name":"Bip001 R Finger12",
 																															"active":true,
@@ -1593,7 +1593,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":186,
+																																"instanceID":188,
 																																"props":{
 																																	"name":"Bip001 R Finger1Nub",
 																																	"active":true,
@@ -1627,7 +1627,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":187,
+																										"instanceID":189,
 																										"props":{
 																											"name":"Bip001 R Finger2",
 																											"active":true,
@@ -1654,7 +1654,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":188,
+																												"instanceID":190,
 																												"props":{
 																													"name":"Bip001 R Finger21",
 																													"active":true,
@@ -1681,7 +1681,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":189,
+																														"instanceID":191,
 																														"props":{
 																															"name":"Bip001 R Finger22",
 																															"active":true,
@@ -1708,7 +1708,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":190,
+																																"instanceID":192,
 																																"props":{
 																																	"name":"Bip001 R Finger2Nub",
 																																	"active":true,
@@ -1742,7 +1742,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":191,
+																										"instanceID":193,
 																										"props":{
 																											"name":"Bip001 R Finger3",
 																											"active":true,
@@ -1769,7 +1769,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":192,
+																												"instanceID":194,
 																												"props":{
 																													"name":"Bip001 R Finger31",
 																													"active":true,
@@ -1796,7 +1796,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":193,
+																														"instanceID":195,
 																														"props":{
 																															"name":"Bip001 R Finger32",
 																															"active":true,
@@ -1823,7 +1823,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":194,
+																																"instanceID":196,
 																																"props":{
 																																	"name":"Bip001 R Finger3Nub",
 																																	"active":true,
@@ -1857,7 +1857,7 @@
 																									},
 																									{
 																										"type":"Sprite3D",
-																										"instanceID":195,
+																										"instanceID":197,
 																										"props":{
 																											"name":"Bip001 R Finger4",
 																											"active":true,
@@ -1884,7 +1884,7 @@
 																										"child":[
 																											{
 																												"type":"Sprite3D",
-																												"instanceID":196,
+																												"instanceID":198,
 																												"props":{
 																													"name":"Bip001 R Finger41",
 																													"active":true,
@@ -1911,7 +1911,7 @@
 																												"child":[
 																													{
 																														"type":"Sprite3D",
-																														"instanceID":197,
+																														"instanceID":199,
 																														"props":{
 																															"name":"Bip001 R Finger42",
 																															"active":true,
@@ -1938,7 +1938,7 @@
 																														"child":[
 																															{
 																																"type":"Sprite3D",
-																																"instanceID":198,
+																																"instanceID":200,
 																																"props":{
 																																	"name":"Bip001 R Finger4Nub",
 																																	"active":true,
@@ -1992,7 +1992,7 @@
 					},
 					{
 						"type":"SkinnedMeshSprite3D",
-						"instanceID":199,
+						"instanceID":201,
 						"props":{
 							"name":"Whiteman",
 							"active":true,
@@ -2014,7 +2014,7 @@
 								1,
 								1
 							],
-							"rootBone":132,
+							"rootBone":134,
 							"boundBox":{
 								"min":[
 									-0.2197284,
@@ -2036,63 +2036,62 @@
 								"radius":0.9904873
 							},
 							"bones":[
-								149,
 								151,
-								152,
-								135,
-								146,
-								147,
-								132,
-								148,
 								153,
 								154,
-								159,
-								163,
-								171,
-								167,
-								160,
-								168,
-								157,
+								137,
+								148,
+								149,
+								134,
+								150,
 								155,
 								156,
-								172,
-								164,
-								165,
-								169,
 								161,
+								165,
 								173,
-								137,
-								136,
-								134,
-								141,
-								142,
+								169,
+								162,
+								170,
+								159,
+								157,
+								158,
+								174,
+								166,
+								167,
+								171,
+								163,
+								175,
+								139,
 								138,
+								136,
 								143,
-								139,
 								144,
-								175,
-								176,
+								140,
+								145,
+								141,
+								146,
 								177,
 								178,
-								183,
-								187,
-								195,
-								191,
-								184,
-								192,
-								180,
-								181,
 								179,
-								196,
-								188,
+								180,
+								185,
 								189,
+								197,
 								193,
-								185,
-								197
+								186,
+								194,
+								182,
+								183,
+								181,
+								198,
+								190,
+								191,
+								195,
+								187,
+								199
 							],
 							"materials":[
 								{
-									"type":"Laya.BlinnPhongMaterial",
 									"path":"Assets/ArcherAsset/Animator/Ragdoll _5741/Materials/ragdoll.lmat"
 								}
 							],

+ 57 - 2
bin/Game/res/Role/LayaScene_Role/Conventional/player.lh

@@ -2139,7 +2139,6 @@
 									],
 									"materials":[
 										{
-											"type":"Laya.BlinnPhongMaterial",
 											"path":"Assets/ArcherAsset/Animator/Ragdoll/Materials/player.lmat"
 										}
 									],
@@ -2162,8 +2161,64 @@
 					"layer":0,
 					"position":[
 						0,
+						2.572,
+						0.963
+					],
+					"rotation":[
 						0,
-						0
+						0,
+						0,
+						-1
+					],
+					"scale":[
+						1,
+						1,
+						1
+					]
+				},
+				"components":[],
+				"child":[]
+			},
+			{
+				"type":"Sprite3D",
+				"instanceID":130,
+				"props":{
+					"name":"archerpos",
+					"active":true,
+					"isStatic":false,
+					"layer":0,
+					"position":[
+						-0.486,
+						1.818,
+						1.201
+					],
+					"rotation":[
+						0,
+						0,
+						0,
+						-1
+					],
+					"scale":[
+						1,
+						1,
+						1
+					]
+				},
+				"components":[],
+				"child":[]
+			},
+			{
+				"type":"Sprite3D",
+				"instanceID":131,
+				"props":{
+					"name":"arrowpos",
+					"active":true,
+					"isStatic":false,
+					"layer":0,
+					"position":[
+						-0.256,
+						2.761,
+						0.32
 					],
 					"rotation":[
 						0,

+ 109 - 61
bin/js/bundle.js

@@ -13,7 +13,7 @@
     GameConfig.screenMode = "none";
     GameConfig.alignV = "top";
     GameConfig.alignH = "left";
-    GameConfig.startScene = "MainGameView.scene";
+    GameConfig.startScene = "InGameView.scene";
     GameConfig.sceneRoot = "";
     GameConfig.debug = false;
     GameConfig.stat = false;
@@ -99,6 +99,16 @@
     }
     EventManager.instance = new Laya.EventDispatcher();
 
+    var Vector3 = Laya.Vector3;
+    class Transform3DHelper {
+        static getForward(transform) {
+            let forward = new Vector3(0, 0, 0);
+            transform.getForward(forward);
+            Laya.Vector3.scale(forward, -1, forward);
+            Laya.Vector3.normalize(forward, forward);
+            return forward;
+        }
+    }
     class GameTools {
         constructor() {
             GameTools.ins = this;
@@ -296,9 +306,6 @@
             this.Prop = new ResDic();
             this.Stone = new ResDic();
             this.Tree = new ResDic();
-            this.RedRay = new ResDic();
-            this.BlueRay = new ResDic();
-            this.GreenRay = new ResDic();
             AssetManager.ins = this;
             EventManager.EventOn(EventState.LoadComplete, this, this.Init);
         }
@@ -332,7 +339,7 @@
     ResourcesPath.Prop = "Game/res/Prop/LayaScene_Prop/Conventional/Prop.lh";
 
     var Sprite3D = Laya.Sprite3D;
-    var Vector3 = Laya.Vector3;
+    var Vector3$1 = Laya.Vector3;
     class modelConfig {
         constructor(model) {
             this.modelcur = model;
@@ -408,7 +415,7 @@
                 modelnum.push(new modelConfig(model));
                 this.modelpool[poolname] = modelnum;
             }
-            model.transform.position = new Vector3(0, 0, -10000);
+            model.transform.position = new Vector3$1(0, 0, -10000);
             model.removeSelf();
             model.active = false;
         }
@@ -423,7 +430,7 @@
         }
     }
 
-    var Vector3$1 = Laya.Vector3;
+    var Vector3$2 = Laya.Vector3;
     var CharacterState;
     (function (CharacterState) {
         CharacterState[CharacterState["Run"] = 0] = "Run";
@@ -435,17 +442,22 @@
     class Runner extends Laya.Script3D {
         constructor() {
             super();
+            this.m_raydistance = 20;
             this.canmove = false;
             this._speed = 1;
             this._press = false;
             this.DownHit = new Laya.HitResult();
             this.FowardHit = new Laya.HitResult();
             this.curspeed = 0;
-            this.currotV = new Vector3$1();
+            this.currotV = new Vector3$2();
             this.currot = new Laya.Quaternion;
-            this.NormalizeSpeed = new Vector3$1();
-            this.curpos = new Vector3$1();
-            this.offest = new Vector3$1();
+            this.NormalizeSpeed = new Vector3$2();
+            this.curpos = new Vector3$2();
+            this.offest = new Vector3$2();
+            this.arspeed = 0;
+            this.arrowspeed = 2;
+            this.offsetpos = new Vector3$2();
+            this.curpos2 = new Vector3$2();
         }
         static get Instance() {
             if (Runner.ins) {
@@ -458,7 +470,10 @@
         onAwake() {
             this.m_player = this.owner;
             this.m_animator = this.owner.getComponent(Laya.Animator);
-            this.m_horseanimator = this.owner.getChildAt(2).getComponent(Laya.Animator);
+            this.m_arrowpos = this.owner.getChildByName("arrowpos");
+            this.m_raypos = this.owner.getChildByName("raypos");
+            this.m_archerpos = this.owner.getChildByName("archerpos");
+            this.m_horseanimator = this.owner.getChildByName("Horse").getComponent(Laya.Animator);
             this.ChangeState(CharacterState.Idle);
             EventManager.StageOn(StageState.Start, this, this.Begin);
         }
@@ -467,26 +482,27 @@
             this.ChangeState(CharacterState.Run);
         }
         onUpdate() {
-            let ray = this.m_player.getChildByName("raypos");
-            console.log("玩家的位置---", this.m_player.transform.position);
-            console.log("ray的位置---", ray.transform.position);
+            if (this.m_animator.getCurrentAnimatorPlayState(0).normalizedTime >= 1) {
+                this.m_animator.play("Idle");
+                GameManager.Instance.CreatArrow(this.m_arrowpos.transform.position.clone(), this.m_arrowpos.transform.rotationEuler.clone(), this.m_arrowpos);
+            }
             if (this.canmove) {
                 if (this._press) {
                     this._speed = 2;
                 }
-                this.Move(new Vector3$1(0, 0, 1), this._speed);
+                this.Move(new Vector3$2(0, 0, 1), this._speed);
             }
             this.RayCheck();
         }
         MoveX(_speed) {
             _speed *= 0.07;
-            this.m_player.transform.translate(new Vector3$1(_speed, 0, 0));
+            this.m_player.transform.translate(new Vector3$2(_speed, 0, 0));
         }
         TurnDir(_dir) {
             if (_dir.x != 0) {
-                Vector3$1.lerp(this.currotV, _dir, 0.35, _dir);
+                Vector3$2.lerp(this.currotV, _dir, 0.35, _dir);
                 this.currotV = _dir;
-                Laya.Quaternion.rotationLookAt(_dir, new Vector3$1(0, 1, 0), this.currot);
+                Laya.Quaternion.rotationLookAt(_dir, new Vector3$2(0, 1, 0), this.currot);
                 Laya.Quaternion.slerp(this.m_player.transform.rotation, this.currot, 0.025, this.currot);
                 this.currot = new Laya.Quaternion(0, this.currot.y, 0);
                 this.m_player.transform.rotation = this.currot;
@@ -500,10 +516,10 @@
         Move(_dir, _speed) {
             var sp = GameTools.Instance.lerp(this.curspeed, _speed, 0.1);
             this.curspeed = sp;
-            Vector3$1.scale(_dir, this.curspeed, this.offest);
-            Vector3$1.add(this.m_player.transform.position, this.offest, this.curpos);
-            Vector3$1.lerp(this.m_player.transform.position, this.curpos, 0.15, this.curpos);
-            this.curpos = new Vector3$1(this.curpos.x, this.curpos.y, this.curpos.z);
+            Vector3$2.scale(_dir, this.curspeed, this.offest);
+            Vector3$2.add(this.m_player.transform.position, this.offest, this.curpos);
+            Vector3$2.lerp(this.m_player.transform.position, this.curpos, 0.15, this.curpos);
+            this.curpos = new Vector3$2(this.curpos.x, this.curpos.y, this.curpos.z);
             this.m_player.transform.position = this.curpos;
         }
         ChangeState(_state) {
@@ -559,8 +575,8 @@
         }
         get DownRayCheck() {
             var isDownHit = false;
-            var startPos = new Vector3$1(this.m_player.transform.position.x, this.m_player.transform.position.y + 1.5, this.m_player.transform.position.z + 0.5);
-            var direction = new Vector3$1(0, -1, 0);
+            var startPos = new Vector3$2(this.m_player.transform.position.x, this.m_player.transform.position.y + 1.5, this.m_player.transform.position.z + 0.5);
+            var direction = new Vector3$2(0, -1, 0);
             var DownRay = new Laya.Ray(startPos, direction);
             if (AssetManager.Instance.mainscene.physicsSimulation.rayCast(DownRay, this.DownHit, 100)) {
                 if (this.DownHit.collider.collisionGroup == 100) {
@@ -571,8 +587,8 @@
         }
         get FowardRayCheck() {
             var isFowardHit = false;
-            var startPos = new Vector3$1(this.m_player.transform.position.x, this.m_player.transform.position.y + 1.5, this.m_player.transform.position.z + 0.5);
-            var direction = new Vector3$1(0, 0, 1);
+            var startPos = new Vector3$2(this.m_player.transform.position.x, this.m_player.transform.position.y + 1.5, this.m_player.transform.position.z + 0.5);
+            var direction = new Vector3$2(0, 0, 1);
             var DownRay = new Laya.Ray(startPos, direction);
             if (AssetManager.Instance.mainscene.physicsSimulation.rayCast(DownRay, this.FowardHit, 1)) {
                 if (this.FowardHit.collider.collisionGroup == 100) {
@@ -581,21 +597,37 @@
             }
             return isFowardHit;
         }
+        Archery() {
+            this.m_animator.play("aimshoot");
+            let arrow = this.m_arrowpos.getChildAt(this.m_arrowpos.numChildren - 1);
+            let ray = this.owner.getChildByName("raypos").getChildAt(0);
+            let forw = Transform3DHelper.getForward(ray.transform);
+            let testRay = new Laya.Ray(this.m_raypos.transform.position, forw);
+            let hitRes = new Laya.HitResult();
+            let isHit = AssetManager.Instance.mainscene.physicsSimulation.rayCast(testRay, hitRes, this.m_raydistance);
+            let foward = Transform3DHelper.getForward(arrow.transform).clone();
+            this.ArrowMove(arrow, new Vector3$2(-foward.x, -foward.y, -foward.z));
+        }
+        ArrowMove(_arrow, _dir) {
+            Laya.timer.frameLoop(1, this, () => {
+                _arrow.transform.translate(_dir);
+            });
+        }
     }
 
     var Vector2 = Laya.Vector2;
-    var Vector3$2 = Laya.Vector3;
+    var Vector3$3 = Laya.Vector3;
     class PlayerControl {
         constructor() {
             this.DownHit = new Laya.HitResult();
             this.canmove = true;
             this.speed = 1;
             this.press = false;
-            this.offset = new Vector3$2(0, 0, 0);
+            this.offset = new Vector3$3(0, 0, 0);
             this.offestx = 0;
-            this.poschazhi = new Vector3$2();
-            this.gengsuipos = new Vector3$2();
-            this.lllpos = new Vector3$2();
+            this.poschazhi = new Vector3$3();
+            this.gengsuipos = new Vector3$3();
+            this.lllpos = new Vector3$3();
             this.hights = 0;
             this.wights = 0;
             PlayerControl.ins = this;
@@ -611,10 +643,10 @@
         Init(_player) {
             this.Player = _player;
             this._runner = this.Player.addComponent(Runner);
-            this.Player.transform.position = new Vector3$2();
+            this.Player.transform.position = new Vector3$3();
             this.Camera = AssetManager.Instance.maincamera;
-            this.Camera.transform.position = new Vector3$2(0, 10, -15);
-            this.Camera.transform.localRotationEuler = new Vector3$2(-5, 0, 0);
+            this.Camera.transform.position = new Vector3$3(0, 10, -15);
+            this.Camera.transform.localRotationEuler = new Vector3$3(-5, 0, 0);
             Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown);
             this.CameraFollow();
         }
@@ -623,7 +655,7 @@
                 return;
             this._runner._press = true;
             this.mouseDownTime = Laya.Browser.now();
-            this.startMousePos = new Vector3$2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
+            this.startMousePos = new Vector3$3(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
             var startpoint = new Laya.Vector2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
             this.curMousePos = this.startMousePos.clone();
             this.curMousePos1 = startpoint.clone();
@@ -636,7 +668,7 @@
             var offestX = MousePos.x - this.curMousePos1.x;
             this.offestx = GameTools.Instance.lerp(this.offestx, offestX, 0.015);
             this._runner.MoveX(-this.offestx);
-            var dir = new Vector3$2(-offestX * 0.005, 0, 0);
+            var dir = new Vector3$3(-offestX * 0.005, 0, 0);
             this._runner.TurnDir(dir);
             this.curMousePos1 = new Vector2(MousePos.x, MousePos.y);
         }
@@ -651,9 +683,10 @@
             Laya.stage.off(Laya.Event.MOUSE_OUT, this, this.onMouseUp);
             let now = Laya.Browser.now();
             let interval = now - this.mouseDownTime;
-            this.endMousePos = new Vector3$2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
+            this.endMousePos = new Vector3$3(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY);
             let dist = Laya.Vector3.distance(this.endMousePos, this.startMousePos);
             if (dist < 50 && interval < 200) {
+                this._runner.Archery();
                 console.log("shoot--");
             }
             this.mouseDownTime = now;
@@ -661,29 +694,29 @@
         CameraFollow() {
             this.hights = 0;
             this.wights = 0;
-            Vector3$2.subtract(this.Player.transform.position, this.Camera.transform.position, this.poschazhi);
+            Vector3$3.subtract(this.Player.transform.position, this.Camera.transform.position, this.poschazhi);
             Laya.timer.frameLoop(1, this, this.GenSui);
         }
         GenSui() {
-            Vector3$2.subtract(this.Player.transform.position, this.poschazhi, this.gengsuipos);
+            Vector3$3.subtract(this.Player.transform.position, this.poschazhi, this.gengsuipos);
             this.hights = GameTools.Instance.lerp(this.hights, 1.0, 0.03);
             this.wights = GameTools.Instance.lerp(this.wights, 0.8, 0.02);
-            this.gengsuipos = new Vector3$2(this.gengsuipos.x, this.gengsuipos.y, this.gengsuipos.z - this.wights);
-            Vector3$2.lerp(this.Camera.transform.position, this.gengsuipos, 0.25, this.lllpos);
-            this.lllpos = new Vector3$2(this.gengsuipos.x, this.gengsuipos.y, this.lllpos.z);
-            this.lllpos = new Vector3$2(this.gengsuipos.x, this.lllpos.y, this.lllpos.z);
+            this.gengsuipos = new Vector3$3(this.gengsuipos.x, this.gengsuipos.y, this.gengsuipos.z - this.wights);
+            Vector3$3.lerp(this.Camera.transform.position, this.gengsuipos, 0.25, this.lllpos);
+            this.lllpos = new Vector3$3(this.gengsuipos.x, this.gengsuipos.y, this.lllpos.z);
+            this.lllpos = new Vector3$3(this.gengsuipos.x, this.lllpos.y, this.lllpos.z);
             this.Camera.transform.position = this.lllpos;
             var qqqwe = new Laya.Quaternion();
-            var eyePos = new Vector3$2(this.gengsuipos.x, this.gengsuipos.y - 0.8, this.gengsuipos.z);
-            Laya.Quaternion.lookAt(eyePos, this.Player.transform.position, new Vector3$2(0, 1, 0), qqqwe);
+            var eyePos = new Vector3$3(this.gengsuipos.x, this.gengsuipos.y - 0.8, this.gengsuipos.z);
+            Laya.Quaternion.lookAt(eyePos, this.Player.transform.position, new Vector3$3(0, 1, 0), qqqwe);
             qqqwe.invert(qqqwe);
             Laya.Quaternion.slerp(this.Camera.transform.rotation, qqqwe, 0.1, qqqwe);
             this.Camera.transform.rotation = qqqwe;
         }
         get DownRayCheck() {
             var isDownHit = false;
-            var startPos = new Vector3$2(this.Player.transform.position.x, this.Player.transform.position.y + 1.5, this.Player.transform.position.z + 0.5);
-            var direction = new Vector3$2(0, -1, 0);
+            var startPos = new Vector3$3(this.Player.transform.position.x, this.Player.transform.position.y + 1.5, this.Player.transform.position.z + 0.5);
+            var direction = new Vector3$3(0, -1, 0);
             var DownRay = new Laya.Ray(startPos, direction);
             if (AssetManager.Instance.mainscene.physicsSimulation.rayCast(DownRay, this.DownHit, 100)) {
                 if (this.DownHit.collider.collisionGroup == 100) {
@@ -868,11 +901,15 @@
             var playermodel = GamePool.Instance.GetModel(AssetManager.Instance.Player.get(1), "");
             var horsemodel = GamePool.Instance.GetModel(AssetManager.Instance.Horse.get(1), "");
             playermodel.addChild(horsemodel);
-            var raypos = playermodel.getChildByName("raypos");
-            this.CreatRay(raypos.transform.position.clone(), raypos.transform.rotationEuler.clone(), raypos);
             playermodel.transform.position = new Laya.Vector3(0, 0, 0);
             horsemodel.transform.localScale = new Laya.Vector3(1, 1, 1);
             horsemodel.transform.localPosition = new Laya.Vector3(0, 0, 0);
+            var raypos = playermodel.getChildByName("raypos");
+            var archerpos = playermodel.getChildByName("archerpos");
+            var arrowpos = playermodel.getChildByName("arrowpos");
+            this.CreatRay(raypos.transform.position.clone(), raypos.transform.rotationEuler.clone(), raypos);
+            this.CreatArcher(archerpos.transform.position.clone(), archerpos.transform.rotationEuler.clone(), archerpos);
+            this.CreatArrow(arrowpos.transform.position.clone(), arrowpos.transform.rotationEuler.clone(), arrowpos);
             PlayerControl.Instance.Init(playermodel);
             AssetManager.Instance.mainscene.addChild(playermodel);
         }
@@ -881,17 +918,34 @@
         CreatRay(pos, euler, raypos) {
             var ray = this.CreatRayPrefab();
             raypos.addChild(ray);
-            ray.transform.position = pos;
-            ray.transform.rotationEuler = euler;
+            ray.transform.position = new Laya.Vector3(pos.x - 0.3, pos.y, pos.z + 0.5);
+            ray.transform.rotationEuler = new Laya.Vector3(-90, euler.y, euler.z);
             let scale = ray.transform.scale.clone();
-            scale.z = 5;
-            scale.x = 1;
+            scale.z = 0.1;
+            scale.y = 3;
+            scale.x = 2;
             ray.transform.scale = scale;
         }
         CreatRayPrefab() {
-            var ray = GamePool.Instance.GetModel(AssetManager.Instance.GreenRay.get(1), "");
+            var ray = GamePool.Instance.GetModel(AssetManager.Instance.Prop.get(8), "");
             return ray;
         }
+        CreatArcher(_pos, _euler, archerpos) {
+            var archer = GamePool.Instance.GetModel(AssetManager.Instance.Prop.get(6), "");
+            archerpos.addChild(archer);
+            archer.transform.position = _pos;
+            archer.transform.rotationEuler = new Laya.Vector3(-90, 0, 0);
+            var scale = archer.transform.scale.clone();
+            scale.z = 0.8;
+            archer.transform.scale = scale;
+        }
+        CreatArrow(_pos, _euler, arrowpos) {
+            var arrow = GamePool.Instance.GetModel(AssetManager.Instance.Prop.get(5), "");
+            arrowpos.addChild(arrow);
+            arrow.transform.position = _pos;
+            var euler = _euler;
+            arrow.transform.rotationEuler = new Laya.Vector3(-90, euler.y, euler.z);
+        }
     }
 
     class LoadView {
@@ -990,12 +1044,6 @@
                 tree.active = false;
                 AssetManager.Instance.Tree.set(i + 1, tree);
             }
-            var Blue = _prop.getChildByName("bulletB");
-            AssetManager.Instance.BlueRay.set(1, Blue);
-            var Red = _prop.getChildByName("bulletR");
-            AssetManager.Instance.RedRay.set(1, Red);
-            var Green = _prop.getChildByName("bulletG");
-            AssetManager.Instance.GreenRay.set(1, Green);
             Laya.loader.clearRes(ResourcesPath.Prop);
             console.log("道具资源加载完毕---");
             this.LoadComplete();

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
bin/js/bundle.js.map


+ 2 - 2
bin/libs/laya.d3.js

@@ -10009,11 +10009,11 @@
 	        this._setTransformFlag(Transform3D.TRANSFORM_WORLDSCALE, false);
 	    }
 	    get scale() {
-	        console.warn("Transfrm3D: discard function,please use getWorldLossyScale instead.");
+	        // console.warn("Transfrm3D: discard function,please use getWorldLossyScale instead.");
 	        return this.getWorldLossyScale();
 	    }
 	    set scale(value) {
-	        console.warn("Transfrm3D: discard function,please use setWorldLossyScale instead.");
+	        // console.warn("Transfrm3D: discard function,please use setWorldLossyScale instead.");
 	        this.setWorldLossyScale(value);
 	    }
 	}

+ 37 - 9
src/Game/GameManager.ts

@@ -11,6 +11,12 @@ export class GameManager{
     //敌人数组
     public EnemyArray:Array<Laya.Sprite3D> = [];
     public mainscene:Laya.Scene3D;
+    // //瞄准线位置
+    // private raypos:Laya.Sprite3D;
+    // //弓位置
+    // private archerpos:Laya.Sprite3D;
+    // //箭位置
+    // private arrowpos:Laya.Sprite3D;
 
     constructor(){
         GameManager.ins = this;
@@ -38,13 +44,17 @@ export class GameManager{
         var playermodel = GamePool.Instance.GetModel(AssetManager.Instance.Player.get(1),"");
         var horsemodel = GamePool.Instance.GetModel(AssetManager.Instance.Horse.get(1),"");
         playermodel.addChild(horsemodel);
+        playermodel.transform.position = new Laya.Vector3(0,0,0);
+        horsemodel.transform.localScale = new  Laya.Vector3(1,1,1);
+        horsemodel.transform.localPosition = new Laya.Vector3(0,0,0);
         var raypos = playermodel.getChildByName("raypos") as Laya.Sprite3D;
+        var archerpos = playermodel.getChildByName("archerpos") as Laya.Sprite3D;
+        var arrowpos = playermodel.getChildByName("arrowpos") as Laya.Sprite3D;
 
         this.CreatRay(raypos.transform.position.clone(),raypos.transform.rotationEuler.clone(),raypos);
+        this.CreatArcher(archerpos.transform.position.clone(),archerpos.transform.rotationEuler.clone(),archerpos);
+        this.CreatArrow(arrowpos.transform.position.clone(),arrowpos.transform.rotationEuler.clone(),arrowpos);
 
-        playermodel.transform.position = new Laya.Vector3(0,0,0);
-        horsemodel.transform.localScale = new  Laya.Vector3(1,1,1);
-        horsemodel.transform.localPosition = new Laya.Vector3(0,0,0);
         PlayerControl.Instance.Init(playermodel);
         AssetManager.Instance.mainscene.addChild(playermodel);
     }
@@ -55,17 +65,35 @@ export class GameManager{
     CreatRay(pos:Laya.Vector3,euler:Laya.Vector3,raypos:Laya.Sprite3D){
         var ray = this.CreatRayPrefab();
         raypos.addChild(ray);
-        ray.transform.position = pos;
-        ray.transform.rotationEuler = euler;
+        ray.transform.position =new Laya.Vector3(pos.x-0.3,pos.y,pos.z+0.5);
+        ray.transform.rotationEuler =new Laya.Vector3(-90,euler.y,euler.z);
         let scale = ray.transform.scale.clone();
-        scale.z = 5;
-        scale.x = 1;
+        scale.z = 0.1;
+        scale.y = 3;
+        scale.x = 2;
         ray.transform.scale = scale;
     }
+    //创建瞄准线预设
     CreatRayPrefab():Laya.Sprite3D{
-        var ray = GamePool.Instance.GetModel(AssetManager.Instance.GreenRay.get(1),"");
+        var ray = GamePool.Instance.GetModel(AssetManager.Instance.Prop.get(8),"");
         return ray
     }
+    //创建弓箭预设
+    CreatArcher(_pos:Laya.Vector3,_euler:Laya.Vector3,archerpos:Laya.Sprite3D){
+        var archer = GamePool.Instance.GetModel(AssetManager.Instance.Prop.get(6),"");
+        archerpos.addChild(archer);
+        archer.transform.position = _pos;
+        archer.transform.rotationEuler =new Laya.Vector3(-90,0,0);
+        var scale = archer.transform.scale.clone();
+        scale.z = 0.8;
+        archer.transform.scale = scale;
+    }
+    CreatArrow(_pos:Laya.Vector3,_euler:Laya.Vector3,arrowpos:Laya.Sprite3D){
+        var arrow = GamePool.Instance.GetModel(AssetManager.Instance.Prop.get(5),"");
+        arrowpos.addChild(arrow);
+        arrow.transform.position = _pos;
+        var euler = _euler;
+        arrow.transform.rotationEuler = new Laya.Vector3(-90,euler.y,euler.z);
+    }
     
-
 }

+ 1 - 0
src/Game/PlayerControl.ts

@@ -89,6 +89,7 @@ export class PlayerControl{
         // // if (interval < GlobalConfig.Appsetting.Input.FireMinInterval) return;
         if (dist < 50 && interval < 200) {
             //射箭逻辑
+            this._runner.Archery();
             console.log("shoot--");
         }
         this.mouseDownTime = now;

+ 55 - 2
src/Game/Runner.ts

@@ -1,8 +1,10 @@
 import Vector3 = Laya.Vector3;
 import Sprite3D = Laya.Sprite3D;
-import { GameTools } from "../Tools/GameTools";
+import { GameTools, Transform3DHelper } from "../Tools/GameTools";
 import { EventManager, EventState, StageState } from "../Tools/EventManager";
 import { AssetManager } from "../Tools/AssetManager";
+import GamePool from "../Tools/GamePool";
+import { GameManager } from "./GameManager";
 //人物状态
 export enum CharacterState{Run,Idle,Die,Win,Shoot}
 export class Runner extends Laya.Script3D{
@@ -15,6 +17,17 @@ export class Runner extends Laya.Script3D{
     m_horseanimator:Laya.Animator;
     //人物状态
     m_characterstate:CharacterState;
+    //箭的位置
+    m_arrowpos:Laya.Sprite3D;
+    //射线的位置
+    m_raypos:Laya.Sprite3D;
+    //弓的位置
+    m_archerpos:Laya.Sprite3D;
+
+    //射线能打到的长度
+    m_raydistance:number = 20;
+
+    
     public canmove:boolean = false;
     //人物速度
     private _speed:number = 1;
@@ -40,7 +53,11 @@ export class Runner extends Laya.Script3D{
     onAwake(){
         this.m_player = this.owner as Sprite3D;
         this.m_animator = this.owner.getComponent(Laya.Animator) as Laya.Animator;
-        this.m_horseanimator = this.owner.getChildAt(2).getComponent(Laya.Animator) as Laya.Animator;
+        this.m_arrowpos = this.owner.getChildByName("arrowpos") as Laya.Sprite3D;
+        this.m_raypos = this.owner.getChildByName("raypos") as Laya.Sprite3D;
+        this.m_archerpos = this.owner.getChildByName("archerpos") as Laya.Sprite3D;
+
+        this.m_horseanimator = this.owner.getChildByName("Horse").getComponent(Laya.Animator) as Laya.Animator;
         this.ChangeState(CharacterState.Idle);
 
         EventManager.StageOn(StageState.Start,this,this.Begin);
@@ -51,6 +68,11 @@ export class Runner extends Laya.Script3D{
     }
     curspeed = 0;
     onUpdate(){
+        if(this.m_animator.getCurrentAnimatorPlayState(0).normalizedTime >=1){
+            this.m_animator.play("Idle");
+            GameManager.Instance.CreatArrow(this.m_arrowpos.transform.position.clone(),this.m_arrowpos.transform.rotationEuler.clone(),this.m_arrowpos);
+        }
+        
         if(this.canmove){
             if(this._press){
                 this._speed = 2;
@@ -192,4 +214,35 @@ export class Runner extends Laya.Script3D{
         }
         return isFowardHit;
     }
+    arspeed:number = 0;
+    //箭速
+    arrowspeed:number = 2;
+    offsetpos = new Vector3();
+    curpos2 = new Vector3();
+
+    //射箭
+    Archery(){
+        this.m_animator.play("aimshoot");
+        let arrow = this.m_arrowpos.getChildAt(this.m_arrowpos.numChildren-1) as Laya.Sprite3D;
+
+        let ray = this.owner.getChildByName("raypos").getChildAt(0) as Laya.Sprite3D;
+        let forw = Transform3DHelper.getForward(ray.transform);
+        let testRay = new Laya.Ray(this.m_raypos.transform.position, forw);
+        let hitRes = new Laya.HitResult();
+        let isHit = AssetManager.Instance.mainscene.physicsSimulation.rayCast(testRay,hitRes,this.m_raydistance);
+        // if(isHit){
+        //     let target = hitRes.collider.owner as Laya.Sprite3D;
+        //     let raypos = ray.transform.position.clone();
+        // }
+        // else{
+
+        // }
+        let foward = Transform3DHelper.getForward(arrow.transform).clone();
+        this.ArrowMove(arrow,new Vector3(-foward.x,-foward.y,-foward.z))
+    }
+    ArrowMove(_arrow:Laya.Sprite3D,_dir:Laya.Vector3){
+        Laya.timer.frameLoop(1,this,()=>{
+            _arrow.transform.translate(_dir);
+        })
+    }
 }

+ 1 - 1
src/GameConfig.ts

@@ -10,7 +10,7 @@ export default class GameConfig{
     static screenMode:string="none";
     static alignV:string="top";
     static alignH:string="left";
-    static startScene:any="MainGameView.scene";
+    static startScene:any="InGameView.scene";
     static sceneRoot:string="";
     static debug:boolean=false;
     static stat:boolean=false;

+ 2 - 6
src/Tools/AssetManager.ts

@@ -22,12 +22,6 @@ export class AssetManager{
     public Stone:ResDic = new ResDic();
     //树
     public Tree:ResDic = new ResDic();
-    //红色射线
-    public RedRay:ResDic = new ResDic();
-    //蓝色射线
-    public BlueRay:ResDic = new ResDic();
-    //绿色射线
-    public GreenRay:ResDic = new ResDic();
 
     constructor(){
         AssetManager.ins = this;
@@ -62,7 +56,9 @@ export class ResourcesPath{
     [
         "Game/res/Role/LayaScene_Role/Conventional/enemy.lh"
     ]
+    //1.大栅栏 2.小栅栏 3.圆木堆 4.火堆 5.箭 6.弓 7.草 8.瞄准线
     static Prop = "Game/res/Prop/LayaScene_Prop/Conventional/Prop.lh";
+    
     // static Prop = 
     // {
     //     1:"Game/res/Prop/LayaScene_Prop/Conventional/Archer.lh",//弓

+ 13 - 0
src/Tools/GameTools.ts

@@ -1,3 +1,5 @@
+import Transform3D = Laya.Transform3D;
+import Vector3 = Laya.Vector3;
 
 export class faafssfafsa
 {
@@ -15,6 +17,17 @@ export class faafssfafsa
     message = "";
     pos:Laya.Vector2;
 }
+
+export class Transform3DHelper {
+    static getForward(transform: Transform3D): Vector3 {
+        let forward = new Vector3(0,0,0);
+        transform.getForward(forward);
+        Laya.Vector3.scale(forward, -1, forward);
+        Laya.Vector3.normalize(forward, forward);
+        return forward;
+    }
+}
+
 export  class GameTools  {
     private static ins:GameTools;
     constructor() {

+ 0 - 6
src/View/LoadView.ts

@@ -103,12 +103,6 @@ export class LoadView{
             tree.active = false;
             AssetManager.Instance.Tree.set(i+1,tree);
         }
-        var Blue = _prop.getChildByName("bulletB") as Laya.Sprite3D;
-        AssetManager.Instance.BlueRay.set(1,Blue);
-        var Red = _prop.getChildByName("bulletR") as Laya.Sprite3D;
-        AssetManager.Instance.RedRay.set(1,Red);
-        var Green = _prop.getChildByName("bulletG") as Laya.Sprite3D;
-        AssetManager.Instance.GreenRay.set(1,Green);
         Laya.loader.clearRes(ResourcesPath.Prop);
         console.log("道具资源加载完毕---");
         this.LoadComplete();