Commit 986d2cb2 authored by 13정준영's avatar 13정준영

Gun Finish

parent a3019a6c
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c46f07b5ed07e4e92aa78254188d3d10, type: 3}
m_Name: InputSystem.inputsettings
m_EditorClassIdentifier:
m_SupportedDevices: []
m_UpdateMode: 1
m_CompensateForScreenOrientation: 1
m_FilterNoiseOnCurrent: 0
m_DefaultDeadzoneMin: 0.125
m_DefaultDeadzoneMax: 0.925
m_DefaultButtonPressPoint: 0.5
m_DefaultTapTime: 0.2
m_DefaultSlowTapTime: 0.5
m_DefaultHoldTime: 0.4
m_TapRadius: 5
m_MultiTapDelayTime: 0.75
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Laser
m_Shader: {fileID: 4800000, guid: 2d11a114f00dffe43a21a629f750b6b0, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ShieldTxture:
m_Texture: {fileID: 2800000, guid: b1b5dbde37aa545429275008ccb78428, type: 3}
m_Scale: {x: 20, y: 10}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Intensity: 1
- _IntersectionIntensity: 1
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 0
- _node_6115: 250
- _opacity: 1
m_Colors:
- _Color: {r: 1, g: 0, b: 0.79818773, a: 0.05490196}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _IntersectionColor: {r: 1, g: 0, b: 0.7734499, a: 1}
- _emision: {r: 1, g: 0, b: 0.8624263, a: 1}
fileFormatVersion: 2
guid: 7d275036f0cb1e544ab7351089d34050
guid: 55572b072e10a284381817180ffe3107
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
......@@ -7,10 +7,10 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Stage Top
m_Shader: {fileID: 4800000, guid: 7188cd9bd45d2ec448974081636e5a45, type: 3}
m_Name: Laser
m_Shader: {fileID: 4800000, guid: 2d11a114f00dffe43a21a629f750b6b0, type: 3}
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 3
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
......@@ -57,7 +57,7 @@ Material:
m_Offset: {x: 0, y: 0}
- _ShieldTxture:
m_Texture: {fileID: 2800000, guid: b1b5dbde37aa545429275008ccb78428, type: 3}
m_Scale: {x: 5, y: 3.55}
m_Scale: {x: 20, y: 10}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
......@@ -67,7 +67,7 @@ Material:
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Intensity: 0.45
- _Intensity: 1
- _IntersectionIntensity: 1
- _Metallic: 0
- _Mode: 3
......@@ -79,7 +79,9 @@ Material:
- _UVSec: 0
- _ZWrite: 0
- _node_6115: 250
- _opacity: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0.05490196}
- _Color: {r: 1, g: 0, b: 0.79818773, a: 0.05490196}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _IntersectionColor: {r: 1, g: 1, b: 1, a: 1}
- _IntersectionColor: {r: 1, g: 0, b: 0.7734499, a: 1}
- _emision: {r: 1, g: 0, b: 0.8624263, a: 1}
This diff is collapsed.
This diff is collapsed.
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Gun Controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers: []
fileFormatVersion: 2
guid: 1e934caf7c306674087d1fbf7f77db32
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: e5c26c0072a7b134f96d52060c682e46
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GunBehaviour : MonoBehaviour
{
Animator animation;
ParticleSystem particle;
public LineRenderer laser;
// Start is called before the first frame update
void Start()
{
animation = GetComponentInChildren<Animator>();
particle = GetComponentInChildren<ParticleSystem>();
}
// Update is called once per frame
void Update()
{
}
public void Fire()
{
Debug.Log('a');
animation.SetTrigger("Fire");
particle.Emit(1);
}
public Ray GetRay()
{
var pos1 = laser.transform.TransformPoint(laser.GetPosition(0));
var pos2 = laser.transform.TransformPoint(laser.GetPosition(1));
return new Ray(pos1, pos2 - pos1);
}
}
fileFormatVersion: 2
guid: 58d5593d5a0df734f8bef0c7602f64f0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -87,17 +87,6 @@ public class PlayEngine : SingletonBehaviour<PlayEngine>
var leftHandObject = handObjects[0];
var rightHandObject = handObjects[1];
var leftLaser = leftHandObject.gameObject.GetComponentInChildren<LineRenderer>();
var rightLaser = rightHandObject.gameObject.GetComponentInChildren<LineRenderer>();
if(leftLaser)
{
var p1 = leftLaser.transform.TransformPoint(leftLaser.GetPosition(0));
var p2 = leftLaser.transform.TransformPoint(leftLaser.GetPosition(1));
input.ray = new Ray(p1, p2-p1);
Debug.DrawRay(input.ray.origin, input.ray.direction, Color.red);
}
level.UpdateNotes(playbackTime);
if (Input.GetKeyDown(KeyCode.Alpha1))
......@@ -122,12 +111,11 @@ public class PlayEngine : SingletonBehaviour<PlayEngine>
{
input.hand = HandType.Left;
if (leftLaser)
if (leftHandObject)
{
var p1 = leftLaser.transform.TransformPoint(leftLaser.GetPosition(0));
var p2 = leftLaser.transform.TransformPoint(leftLaser.GetPosition(1));
input.ray = new Ray(p1, p2-p1);
var gun = leftHandObject.GetComponentInChildren<GunBehaviour>();
input.ray = gun.GetRay();
gun.Fire();
Debug.DrawRay(input.ray.origin, input.ray.direction, Color.magenta, 1);
level.HandleInput(input);
......@@ -136,12 +124,11 @@ public class PlayEngine : SingletonBehaviour<PlayEngine>
if (fire.GetStateDown(rightHand))
{
input.hand = HandType.Right;
if (rightLaser)
if (rightHandObject)
{
var p1 = rightLaser.transform.TransformPoint(rightLaser.GetPosition(0));
var p2 = rightLaser.transform.TransformPoint(rightLaser.GetPosition(1));
input.ray = new Ray(p1, p2 - p1);
var gun = rightHandObject.GetComponentInChildren<GunBehaviour>();
input.ray = gun.GetRay();
gun.Fire();
Debug.DrawRay(input.ray.origin, input.ray.direction, Color.cyan, 1);
level.HandleInput(input);
......@@ -152,6 +139,7 @@ public class PlayEngine : SingletonBehaviour<PlayEngine>
{
if (e.Source != "SteamVR") // ignore SteamVR, rethrow otherwise
{
Debug.LogError(e.StackTrace);
throw e;
}
}
......
This diff is collapsed.
fileFormatVersion: 2
guid: 2d11a114f00dffe43a21a629f750b6b0
ShaderImporter:
externalObjects: {}
defaultTextures:
- _ShieldTxture: {fileID: 2800000, guid: a0f6e9a63c73f9c45aa0faf8e7cb2a07, type: 3}
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
......@@ -89,10 +89,7 @@ Shader "Shader Forge/Sheild" {
float4 node_7398 = _Time;
float2 node_5641 = float2(i.uv0.r,(i.uv0.g+frac(node_7398.r)));
float4 _ShieldTxture_var = tex2D(_ShieldTxture,TRANSFORM_TEX(node_5641, _ShieldTxture));
float node_8799 = 4.0;
float node_5730 = (node_7398.g*node_8799);
float node_2051 = sin(node_5730);
float3 emissive = saturate(min(node_2871,(node_2871*(_ShieldTxture_var.rgb.r*(node_2051*0.3+0.5)))));
float3 emissive = saturate(min(node_2871,(node_2871*(_ShieldTxture_var.rgb.r*(sin((node_7398.g*4.0))*0.3+0.5)))));
float3 finalColor = emissive;
fixed4 finalRGBA = fixed4(finalColor,0.1);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
......
......@@ -92,7 +92,7 @@ Material:
- _ZWrite: 0
m_Colors:
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 0.54509807}
- _Color: {r: 0, g: 1, b: 0.9411764, a: 0.05490196}
- _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0.764151, g: 0, b: 0, a: 1}
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
......
......@@ -18,7 +18,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 1
skinWeights: 1
textureQuality: 1
anisotropicTextures: 0
antiAliasing: 0
......@@ -53,7 +53,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 0
antiAliasing: 0
......@@ -88,7 +88,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 0
......@@ -123,7 +123,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 0
......@@ -158,7 +158,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
skinWeights: 4
textureQuality: 0
anisotropicTextures: 2
antiAliasing: 2
......@@ -193,7 +193,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
skinWeights: 4
textureQuality: 0
anisotropicTextures: 2
antiAliasing: 2
......@@ -201,7 +201,7 @@ QualitySettings:
softVegetation: 1
realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1
vSyncCount: 1
vSyncCount: 0
lodBias: 2
maximumLODLevel: 0
streamingMipmapsActive: 0
......@@ -216,16 +216,4 @@ QualitySettings:
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality:
Android: 2
Lumin: 5
Nintendo 3DS: 5
Nintendo Switch: 5
PS4: 5
PSP2: 2
Standalone: 5
WebGL: 3
Windows Store Apps: 5
XboxOne: 5
iPhone: 2
tvOS: 2
m_PerPlatformDefaultQuality: {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment