Commit 9a9a2a69 authored by 18신대성's avatar 18신대성

키보드 입력으로 조작가능하게, 탄설명창 크기 키움

parent 945310ae
...@@ -36,8 +36,8 @@ RectTransform: ...@@ -36,8 +36,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -115.7, y: 164.7} m_AnchoredPosition: {x: -203.24, y: 216.96}
m_SizeDelta: {x: 231.4, y: 40} m_SizeDelta: {x: 406.47, y: 144.51}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2381591747203015850 --- !u!222 &2381591747203015850
CanvasRenderer: CanvasRenderer:
...@@ -111,8 +111,8 @@ RectTransform: ...@@ -111,8 +111,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0.7, y: -31.03} m_AnchoredPosition: {x: -0.000038147, y: -38.8}
m_SizeDelta: {x: 260.99, y: 78.64} m_SizeDelta: {x: 397.51, y: 119.78}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7654206411380583771 --- !u!222 &7654206411380583771
CanvasRenderer: CanvasRenderer:
...@@ -170,7 +170,7 @@ MonoBehaviour: ...@@ -170,7 +170,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.32941177} m_EffectColor: {r: 0, g: 0, b: 0, a: 0.32941177}
m_EffectDistance: {x: 1, y: -1} m_EffectDistance: {x: 2, y: -2}
m_UseGraphicAlpha: 1 m_UseGraphicAlpha: 1
--- !u!1 &5777967798850079087 --- !u!1 &5777967798850079087
GameObject: GameObject:
...@@ -207,8 +207,8 @@ RectTransform: ...@@ -207,8 +207,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.000048637, y: 46.5} m_AnchoredPosition: {x: 0.000033259, y: 74.8}
m_SizeDelta: {x: 131.19, y: 45.79} m_SizeDelta: {x: 212.01, y: 74}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8579805982136759849 --- !u!222 &8579805982136759849
CanvasRenderer: CanvasRenderer:
...@@ -240,11 +240,11 @@ MonoBehaviour: ...@@ -240,11 +240,11 @@ MonoBehaviour:
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: e3afb6123179dd040a1f0d82c85df332, type: 3} m_Font: {fileID: 12800000, guid: e3afb6123179dd040a1f0d82c85df332, type: 3}
m_FontSize: 37 m_FontSize: 60
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 3 m_MinSize: 3
m_MaxSize: 40 m_MaxSize: 60
m_Alignment: 4 m_Alignment: 4
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
......
fileFormatVersion: 2
guid: f41fb0346ec0e104c9691b3eff37df33
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
...@@ -5,6 +5,7 @@ using UnityEngine; ...@@ -5,6 +5,7 @@ using UnityEngine;
public class CameraController : MonoBehaviour public class CameraController : MonoBehaviour
{ {
public GameObject helpUI; public GameObject helpUI;
public GameObject helpUI2;
Vector3 dragOrigin; Vector3 dragOrigin;
Vector3 moveOrigin; Vector3 moveOrigin;
...@@ -94,6 +95,7 @@ public class CameraController : MonoBehaviour ...@@ -94,6 +95,7 @@ public class CameraController : MonoBehaviour
float startTime = Time.time; float startTime = Time.time;
Vector3 posDiff = (player.head.transform.position - transform.position) / cameraMoveDuration; Vector3 posDiff = (player.head.transform.position - transform.position) / cameraMoveDuration;
float angleDiff = -30f / cameraMoveDuration; float angleDiff = -30f / cameraMoveDuration;
helpUI2.SetActive(false);
previousPos = transform.position; previousPos = transform.position;
previousAngle = new Vector3(transform.eulerAngles.x > 180 ? transform.eulerAngles.x - 360 : transform.eulerAngles.x, previousAngle = new Vector3(transform.eulerAngles.x > 180 ? transform.eulerAngles.x - 360 : transform.eulerAngles.x,
transform.eulerAngles.y > 180 ? transform.eulerAngles.y - 360 : transform.eulerAngles.y, transform.eulerAngles.y > 180 ? transform.eulerAngles.y - 360 : transform.eulerAngles.y,
...@@ -167,6 +169,7 @@ public class CameraController : MonoBehaviour ...@@ -167,6 +169,7 @@ public class CameraController : MonoBehaviour
GameManager.inst.isZooming = false; GameManager.inst.isZooming = false;
// Visible mouse cursor // Visible mouse cursor
helpUI2.SetActive(true);
Cursor.visible = true; Cursor.visible = true;
Cursor.lockState = CursorLockMode.None; Cursor.lockState = CursorLockMode.None;
} }
......
...@@ -114,8 +114,10 @@ public class GameManager : SingletonBehaviour<GameManager> ...@@ -114,8 +114,10 @@ public class GameManager : SingletonBehaviour<GameManager>
public void GameOver(bool onlyRestart = false) public void GameOver(bool onlyRestart = false)
{ {
if (!onlyRestart) Debug.Log("Game Over!"); if (!onlyRestart) Debug.Log("Game Over!");
StageSelector.inst.SaveClearData(stageStrIdx, onlyRestart); StageSelector.inst.SaveClearData(stageStrIdx, false);
isGameOver = true; isGameOver = true;
Cursor.visible = true;
Cursor.lockState = CursorLockMode.None;
StopAllCoroutines(); StopAllCoroutines();
uiGenerator.ResetAllClearUIs(); uiGenerator.ResetAllClearUIs();
StartCoroutine(RestartStage()); StartCoroutine(RestartStage());
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class IngameManager : SingletonBehaviour<IngameManager>
{
private int _briefcaseCount = 0;
public int BriefcaseCount {
get { return _briefcaseCount; }
set {
for (int i = 0; i < value - _briefcaseCount; ++i)
{
IngameUIManager.inst.AddBriefcaseUI();
}
for (int i = 0; i < _briefcaseCount - value; ++i)
{
//RemoveBriefcaseUI();
}
_briefcaseCount = value;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class KeyInputManager : MonoBehaviour
{
// Update is called once per frame
void LateUpdate()
{
if (Input.GetKeyDown(KeyCode.R))
{
GameManager.inst.GameOver(true);
}
if (Input.GetKeyDown(KeyCode.Space) && !GameManager.inst.isPlayerMoving && !GameManager.inst.isZooming)
{
if (GameManager.inst.isPlayerShooting)
{
StartCoroutine(Camera.main.GetComponent<CameraController>().ZoomOutFromPlayer(PlayerController.inst.currentPlayer));
}
else if (PlayerController.inst.currentPlayer != null)
{
StartCoroutine(PlayerController.inst.currentPlayer.CountPlayerClick(Time.time - 1f, true));
}
}
}
}
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8995125956e2a254c9d8a0fcd0e7555c guid: 5eb3cfa4d93a1f94e86c4eee40a7d541
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2
......
...@@ -92,16 +92,19 @@ public class Mirror : Wall, IBulletInteractor, IBreakable ...@@ -92,16 +92,19 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
// start reflection // start reflection
Debug.Log("Start Reflection"); Debug.Log("Start Reflection");
Vector2Int frontFloorPos = dir ? if (parRay.Count > 0)
new Vector2Int(Mathf.RoundToInt(mapPos.x), Mathf.RoundToInt(mapPos.y + 0.5f * side))
: new Vector2Int(Mathf.RoundToInt(mapPos.x + 0.5f * side), Mathf.RoundToInt(mapPos.y));
if (floorCountGrid.TryGetValue(frontFloorPos, out int frontFloorCount))
{ {
if (frontFloorCount == 0) floorCountGrid[frontFloorPos]++; // have floor Vector2Int frontFloorPos = dir ?
} new Vector2Int(Mathf.RoundToInt(mapPos.x), Mathf.RoundToInt(mapPos.y + 0.5f * side))
else // no floor on there : new Vector2Int(Mathf.RoundToInt(mapPos.x + 0.5f * side), Mathf.RoundToInt(mapPos.y));
{ if (floorCountGrid.TryGetValue(frontFloorPos, out int frontFloorCount))
floorCountGrid.Add(frontFloorPos, -1); {
if (frontFloorCount == 0) floorCountGrid[frontFloorPos]++; // have floor
}
else // no floor on there
{
floorCountGrid.Add(frontFloorPos, -1);
}
} }
for (; Mathf.Abs(i) < (MapManager.inst.currentMap.maxMapSize + 1); i += side) for (; Mathf.Abs(i) < (MapManager.inst.currentMap.maxMapSize + 1); i += side)
{ {
......
...@@ -101,15 +101,15 @@ public class Player : MonoBehaviour ...@@ -101,15 +101,15 @@ public class Player : MonoBehaviour
/// </summary> /// </summary>
/// <param name="startTime">Start time of the timer.</param> /// <param name="startTime">Start time of the timer.</param>
/// <returns></returns> /// <returns></returns>
public IEnumerator CountPlayerClick(float startTime) public IEnumerator CountPlayerClick(float startTime, bool direct = false)
{ {
float time = Time.time; float time = Time.time;
float doubleClickDelay = 0.2f; float doubleClickDelay = 0.2f;
float endTime = startTime + 1f; float endTime = startTime + 1f;
bool doubleClicked = false; bool doubleClicked = direct;
bool isHoldExit = false; bool isHoldExit = false;
aimLight.gameObject.SetActive(true); aimLight.gameObject.SetActive(true);
while (time <= endTime) while (time <= endTime && !direct)
{ {
yield return null; yield return null;
aimLight.lightMultiplier += 10 * Time.deltaTime; aimLight.lightMultiplier += 10 * Time.deltaTime;
......
...@@ -11,13 +11,11 @@ public class BulletHoverUI : MonoBehaviour ...@@ -11,13 +11,11 @@ public class BulletHoverUI : MonoBehaviour
public void OnMouseEnter() public void OnMouseEnter()
{ {
Debug.Log("hello");
hoverUI.SetActive(true); hoverUI.SetActive(true);
} }
public void OnMouseExit() public void OnMouseExit()
{ {
Debug.Log("hello");
hoverUI.SetActive(false); hoverUI.SetActive(false);
} }
} }
...@@ -53,7 +53,7 @@ public class BulletUIGenerator : MonoBehaviour ...@@ -53,7 +53,7 @@ public class BulletUIGenerator : MonoBehaviour
case BulletCode.Mirror: case BulletCode.Mirror:
bulletUIInst.GetComponent<Image>().sprite = mirrBullet; bulletUIInst.GetComponent<Image>().sprite = mirrBullet;
bulletUIInst.GetComponent<BulletHoverUI>().headerText.text = "거울탄"; bulletUIInst.GetComponent<BulletHoverUI>().headerText.text = "거울탄";
bulletUIInst.GetComponent<BulletHoverUI>().headerText.color = Color.gray; bulletUIInst.GetComponent<BulletHoverUI>().headerText.color = new Color(0.1f,0.1f,0.1f,1);
bulletUIInst.GetComponent<BulletHoverUI>().bodyText.text = "일반 벽을 거울로 만듦\n회색 서류가방에서 제공"; bulletUIInst.GetComponent<BulletHoverUI>().bodyText.text = "일반 벽을 거울로 만듦\n회색 서류가방에서 제공";
break; break;
default: default:
......
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