10 changed files with 196 additions and 5 deletions
@ -0,0 +1,118 @@ |
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1 &6396829578575678466 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 681415745504950151} |
|||
- component: {fileID: 8598721907453598192} |
|||
m_Layer: 0 |
|||
m_Name: 9-Sliced |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &681415745504950151 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 6396829578575678466} |
|||
serializedVersion: 2 |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 66, y: 0, z: 0} |
|||
m_LocalScale: {x: 30, y: 0.06, z: 1} |
|||
m_ConstrainProportionsScale: 0 |
|||
m_Children: [] |
|||
m_Father: {fileID: 2920542907525857825} |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!212 &8598721907453598192 |
|||
SpriteRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 6396829578575678466} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 0 |
|||
m_ReceiveShadows: 0 |
|||
m_DynamicOccludee: 1 |
|||
m_StaticShadowCaster: 0 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_RayTracingMode: 0 |
|||
m_RayTraceProcedural: 0 |
|||
m_RenderingLayerMask: 1 |
|||
m_RendererPriority: 0 |
|||
m_Materials: |
|||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_ReceiveGI: 1 |
|||
m_PreserveUVs: 0 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
m_StitchLightmapSeams: 1 |
|||
m_SelectedEditorRenderState: 0 |
|||
m_MinimumChartSize: 4 |
|||
m_AutoUVMaxDistance: 0.5 |
|||
m_AutoUVMaxAngle: 89 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_SortingLayerID: 0 |
|||
m_SortingLayer: 0 |
|||
m_SortingOrder: 3000 |
|||
m_Sprite: {fileID: 21300000, guid: 27c2f96085de0b54793a4a2082ae2994, type: 3} |
|||
m_Color: {r: 1, g: 1, b: 1, a: 1} |
|||
m_FlipX: 0 |
|||
m_FlipY: 0 |
|||
m_DrawMode: 0 |
|||
m_Size: {x: 0.3, y: 0.3} |
|||
m_AdaptiveModeThreshold: 0.5 |
|||
m_SpriteTileMode: 0 |
|||
m_WasSpriteAssigned: 1 |
|||
m_MaskInteraction: 0 |
|||
m_SpriteSortPoint: 0 |
|||
--- !u!1 &9064618260693730221 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 2920542907525857825} |
|||
m_Layer: 0 |
|||
m_Name: ArmLiner |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &2920542907525857825 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 9064618260693730221} |
|||
serializedVersion: 2 |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_ConstrainProportionsScale: 0 |
|||
m_Children: |
|||
- {fileID: 681415745504950151} |
|||
m_Father: {fileID: 0} |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: a70803333a694d54186efe1b973ee9eb |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
@ -0,0 +1,3 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 829019828400459ba763b4720ddfb7c5 |
|||
timeCreated: 1753452626 |
@ -0,0 +1,51 @@ |
|||
using System.Collections.Generic; |
|||
using Entitas; |
|||
using UnityEngine; |
|||
using NotImplementedException = System.NotImplementedException; |
|||
|
|||
namespace CoreGame.Render |
|||
{ |
|||
public class ArmSystem : IExecuteSystem |
|||
{ |
|||
private readonly RenderContext m_Context; |
|||
public ArmSystem(RenderContext contexts) |
|||
{ |
|||
m_Context = contexts; |
|||
} |
|||
public void Execute(float deltaTime) |
|||
{ |
|||
|
|||
var playerEntHandle = m_Context.LocalPlayerEntHandle; |
|||
if (playerEntHandle.value == null) |
|||
return; |
|||
|
|||
var inputEntHandle = m_Context.InputEntHandle; |
|||
if (inputEntHandle.value == null) |
|||
return; |
|||
|
|||
var shoot = inputEntHandle.value.shootDir; |
|||
if (shoot.arm == null) |
|||
{ |
|||
shoot.arm = GoPoolDic.GetPool(shoot.armPath).GetNewGo(MainAssetCallBack, inputEntHandle.value.creationIndex); |
|||
return; |
|||
} |
|||
if (shoot.arm.go == null) |
|||
return; |
|||
|
|||
var localPos = playerEntHandle.value.transformProxy; |
|||
shoot.arm.go.transform.position = localPos.GetRenderPosition(); |
|||
shoot.arm.go.transform.eulerAngles = new(0, 0, shoot.value); |
|||
} |
|||
|
|||
private static void MainAssetCallBack(ReuseGoData reuseGoData) |
|||
{ |
|||
if (reuseGoData.go == null) |
|||
{ |
|||
RLog.LogInfo($"go is null, asset path: {reuseGoData.path}"); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,3 @@ |
|||
fileFormatVersion: 2 |
|||
guid: b6b4f6423a0d46e9ac67c3981fd84aa2 |
|||
timeCreated: 1753452636 |
Loading…
Reference in new issue