Commit 80323c34 authored by 16이진형's avatar 16이진형

안드로이드 실행

parent 9328e812
...@@ -18,6 +18,7 @@ namespace ISEKAI_Model ...@@ -18,6 +18,7 @@ namespace ISEKAI_Model
protected override bool exclusiveCondition() protected override bool exclusiveCondition()
{ {
return true;
int chance = (new Random()).Next() / 10; int chance = (new Random()).Next() / 10;
bool chanceCondition = chance <= 0; bool chanceCondition = chance <= 0;
bool prevCondition = game.allEventsList.Find(e => e.eventName == "농사 이벤트 3").status == EventStatus.Completed && bool prevCondition = game.allEventsList.Find(e => e.eventName == "농사 이벤트 3").status == EventStatus.Completed &&
......
...@@ -2,7 +2,7 @@ using System; ...@@ -2,7 +2,7 @@ using System;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using UnityEngine;
namespace ISEKAI_Model namespace ISEKAI_Model
{ {
...@@ -89,7 +89,23 @@ namespace ISEKAI_Model ...@@ -89,7 +89,23 @@ namespace ISEKAI_Model
} }
public static List<Command> ParseScript(string scriptPath) public static List<Command> ParseScript(string scriptPath)
{ {
string[] commandList = File.ReadAllText(scriptPath).Trim().Split('\n'); //구 경로 삭제
if (scriptPath.Contains("Assets/ISEKAI_Model/"))
{
scriptPath = scriptPath.Replace("Assets/ISEKAI_Model/","");
}
//마지막 .txt 제거
if(scriptPath.IndexOf(".txt") >= scriptPath.Length - 5)
{
scriptPath = scriptPath.Replace(".txt", "");
}
//스크립트 가져오기
TextAsset script = Resources.Load(scriptPath,typeof(TextAsset)) as TextAsset;
//읽은거 쪼개기
string[] commandList = script.text.Trim().Split('\n');
for (int i = 0; i < commandList.Length; i++) for (int i = 0; i < commandList.Length; i++)
commandList[i] = commandList[i].Trim(); commandList[i] = commandList[i].Trim();
......
...@@ -184,22 +184,52 @@ public class GameManager : MonoBehaviour ...@@ -184,22 +184,52 @@ public class GameManager : MonoBehaviour
public Vector3 GetEventSDVectorByLocation(EventLocation location) public Vector3 GetEventSDVectorByLocation(EventLocation location)
{ {
return new Vector3((int)location - 6, (int)location - 6); float x = 0;
/*switch((int)location) float y = 0;
switch(location)
{ {
case 1: case EventLocation.BackMount:
return new Vector3(-1, 5); x = -13; y = -4;
case 2: break;
return new Vector3(1, -1); case EventLocation.CarpenterHouse:
case 3: x = -5; y = -4.5f;
return new Vector3(8, 4); break;
case 4: case EventLocation.Farm:
return new Vector3(0, 0); x = -8; y = 0;
case 5: break;
return new Vector3(0, 0); case EventLocation.Field:
case 6: x = -4; y = -1;
return new Vector3(3, 3); break;
case EventLocation.FrontMount:
}*/ x = -1; y = 5.5f;
break;
case EventLocation.Mine:
x = 2; y = -6;
break;
case EventLocation.SecretaryHouse:
x = -5; y = 5.25f;
break;
case EventLocation.TaskLeaderHouse:
x = 6; y = 0.5f;
break;
case EventLocation.TechGuideStaffHouse:
x = 5; y = -4.5f;
break;
case EventLocation.TownSquare:
x = -2.5f; y = 0;
break;
case EventLocation.TownWell:
x = 2; y = 1.5f;
break;
case EventLocation.TownWitchHouse:
x = 6; y = 6.5f;
break;
case EventLocation.WayToTown:
x = 7; y = 0;
break;
}
return new Vector3(x, y);
} }
} }
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
public class Block : MonoBehaviour public class Block : MonoBehaviour
{ {
...@@ -12,11 +13,19 @@ public class Block : MonoBehaviour ...@@ -12,11 +13,19 @@ public class Block : MonoBehaviour
tetrisGameManager = FindObjectOfType<TetrisGameManager>(); tetrisGameManager = FindObjectOfType<TetrisGameManager>();
if (!isValidGridPos()) if (!isValidGridPos())
{ {
Debug.Log("GAME OVER");
Destroy(gameObject); Destroy(gameObject);
_StartGameEndingProcess();
} }
} }
private void _StartGameEndingProcess()
{
tetrisGameManager.eventManager.SetActiveEventSceneThings(true);
tetrisGameManager.eventManager.ExecuteOneScript();
SceneManager.SetActiveScene(tetrisGameManager.eventManager.gameObject.scene);
SceneManager.UnloadSceneAsync(gameObject.scene);
}
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3c62154c90feac048a86f2c42a32919e guid: 2f273195e231de74ca2b8b8b3b4471b0
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
...@@ -32,6 +32,9 @@ GraphicsSettings: ...@@ -32,6 +32,9 @@ GraphicsSettings:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: [] m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0} type: 0}
......
...@@ -55,8 +55,8 @@ PlayerSettings: ...@@ -55,8 +55,8 @@ PlayerSettings:
iosAppInBackgroundBehavior: 0 iosAppInBackgroundBehavior: 0
displayResolutionDialog: 1 displayResolutionDialog: 1
iosAllowHTTPDownload: 1 iosAllowHTTPDownload: 1
allowedAutorotateToPortrait: 1 allowedAutorotateToPortrait: 0
allowedAutorotateToPortraitUpsideDown: 1 allowedAutorotateToPortraitUpsideDown: 0
allowedAutorotateToLandscapeRight: 1 allowedAutorotateToLandscapeRight: 1
allowedAutorotateToLandscapeLeft: 1 allowedAutorotateToLandscapeLeft: 1
useOSAutorotation: 1 useOSAutorotation: 1
...@@ -148,6 +148,7 @@ PlayerSettings: ...@@ -148,6 +148,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1 androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1 androidMaxAspectRatio: 2.1
applicationIdentifier: applicationIdentifier:
Android: com.isekai.isekai
Standalone: com.Company.ProductName Standalone: com.Company.ProductName
buildNumber: {} buildNumber: {}
AndroidBundleVersionCode: 1 AndroidBundleVersionCode: 1
...@@ -253,7 +254,99 @@ PlayerSettings: ...@@ -253,7 +254,99 @@ PlayerSettings:
androidGamepadSupportLevel: 0 androidGamepadSupportLevel: 0
resolutionDialogBanner: {fileID: 0} resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons: [] m_BuildTargetIcons: []
m_BuildTargetPlatformIcons: [] m_BuildTargetPlatformIcons:
- m_BuildTarget: Android
m_Icons:
- m_Textures: []
m_Width: 432
m_Height: 432
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 324
m_Height: 324
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 216
m_Height: 216
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 162
m_Height: 162
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 108
m_Height: 108
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 81
m_Height: 81
m_Kind: 2
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 192
m_Height: 192
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 144
m_Height: 144
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 96
m_Height: 96
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 72
m_Height: 72
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 48
m_Height: 48
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 36
m_Height: 36
m_Kind: 0
m_SubKind:
m_BuildTargetBatching: [] m_BuildTargetBatching: []
m_BuildTargetGraphicsAPIs: [] m_BuildTargetGraphicsAPIs: []
m_BuildTargetVRSettings: [] m_BuildTargetVRSettings: []
......
...@@ -216,4 +216,5 @@ QualitySettings: ...@@ -216,4 +216,5 @@ QualitySettings:
asyncUploadPersistentBuffer: 1 asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1 resolutionScalingFixedDPIFactor: 1
excludedTargetPlatforms: [] excludedTargetPlatforms: []
m_PerPlatformDefaultQuality: {} m_PerPlatformDefaultQuality:
Standalone: 0
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