Skip to content

Commit 6419300

Browse files
authored
Merge pull request #111 from sunforest99/master
[수정] 일꾼이 건설중일때 다른 행동 가능한 버그 수정 타일 UI 안뜨는 버그 수정
2 parents a65e16c + 0db7bc0 commit 6419300

16 files changed

Lines changed: 387 additions & 64 deletions

File tree

Assets/Lomenu UI/Materials/Dissolve/Hexart_DECG.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Material:
8181
- _Mode: 0
8282
- _OcclusionStrength: 1
8383
- _Parallax: 0.02
84-
- _Progress: -0.0054912344
84+
- _Progress: -0.0058515226
8585
- _RangeIn: 0.034
8686
- _RangeOut: 0.001
8787
- _SmoothnessTextureChannel: 0

Assets/Resources/mapinfo.txt

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
NNNNMMM1110000000000000000000000000200222222222222
2-
NNNMM111B000000000003300300000000002222022222C2200
3-
NNNMM111110000003333333333300000000002222220200200
4-
MMMMM1111100000033I333I330000000002222000000022222
5-
MMMMM111111000033333300033000002202200000000002000
6-
MMMM1111110003333303000333000000003020000020000220
7-
1MMM11B1100000330000300033000333000300220020000022
8-
11111111100000000003000033333303000322220002200222
9-
1111111000000A000000000000003D330000022C2002222200
10-
11111000000000033330000000000300000002222222202000
11-
00101000000033333033000300000300000000002222222200
12-
00000000003000000003033330003003333300000030000000
13-
00000000030003000003330000003330000033000030000000
14-
0011000003003300033D300000003300000003000300000000
15-
02222200033030333300300003330000033333311111330000
16-
2222220033330000000000000333000033333013M111330000
17-
2222C22003300000000000000000000033300331MNNN110MMM
18-
2222220000000000000100000000A00033300001NNNN1MMMMM
19-
0002200000000000001111101111000033333101MNNNMMMMMM
20-
0000000030000000111112211110000000033131MMMMMMMMM0
21-
0000010033300A001111222221110010000333331111111100
22-
000001003300000112222MM222111010000003333001111111
23-
00000011333300000122MMMMM2221101000333303000100010
24-
0000111300000000122MMMMMMM222211000303033000000000
25-
0000111100003300112MMMNNMMMM2211100130033000000000
26-
0000110130033000122MMNNNNMM22111000030330000000000
27-
00000011130330000122MNNNMMMM221B100000030000000000
28-
000001100000000111222MMMMMM22211100000000000000000
29-
000000113003000111111222222C2211100000000033000000
30-
00110000033000011111112222221100000011003303000000
31-
00101000300000000110011111B11110000010330030300000
32-
11111000300030000100111111111000000311110003300000
33-
01011100303333000000000000110000033011011300030000
34-
011B100033000300000000A000000000300101B10300330000
35-
00111000003300000000000000000000030011113033330000
36-
00010000000000033333000000001000033300030330300000
1+
NNNNMMM1110000000000000000000E00000222222IIIIII222
2+
NNNMM111000000000000K300300000000002222C2IIII02J00
3+
NNNMM111G10000003333333333K0000E00000022222EFEE200
4+
MMMMM111110E0000333333K3300A00000022220000EEE22222
5+
MMMMM11G111000033L3K3000330000022022000FF000EE2000
6+
MMMM11111100033333030003K30000000030200F0020000J20
7+
1MMM11B11000003300003000330003330003002JE0200000J2
8+
11111G11100000000E030E0033333L33000322JJ000220022I
9+
1111H11000000E0000000000000030330000022JJ002222200
10+
1G1110000000000333300A00000003000E00022JJ22C2C2000
11+
00100000000033333033000300E00300000000002222222I00
12+
0000000000300000E003033330003003333300000030000000
13+
0000000E030003000003L30000003330000033000030000000
14+
0011000003003300033030000000330E00000K000300000000
15+
02122200033030333300300E03330000033333311111330000
16+
222222003L33000000000000033300003D333DH3M1G1330000
17+
22J2CI200330000000000E00000000E033300331MNNNG10MMM
18+
222222000000F000001111H111G000003K300001NNNN1MMMMM
19+
000J200000E00000001111111111100033333101MNNNMMMMMM
20+
000000F030000000111G12211HH1100000033131MMMMMMMMM0
21+
0000010033300E00G11122222HHH111000033333G111111G00
22+
000001000300000112222MM222HH111000000L33300G11111G
23+
00E000G13K3300000122MMMMMI2211110A0333303000100010
24+
000011130000000012IMMMMMMM222211000303033000000000
25+
00001G1100003300112MMMNNMMMM221G10013003300000F000
26+
0F00H1B130033000122MMNNNNMM22111000030300000000000
27+
0000001113033000A122MNNNMMMM221110000003000A000000
28+
000001G0000000011122IMMMMMM22211G0E00000E000001000
29+
0000001130030EE11G111222222CI211100000000033000000
30+
001100000330EEE11111112222221100000011003303000000
31+
001B10F030000EEEE110011G11B111100E0011330030300000
32+
11111F0030003EEEE10A111111G1100F000311EG0003300000
33+
01001100303333EEEE0000000011000003301GME1300030000
34+
0110G000330003EEEE000000000000E0300111H10300330000
35+
001G10000033000000000000000000E0030011113033330000
36+
000100E000000003333300E000001000033300030330300000
3737
00000000033330330000330000111000000000033333000000
38-
00000000M30000300000030001101133000000000030000000
39-
00000000000M00033000000100111100333333333300000000
40-
0000000MMM0031100001000110010003300000000000000000
41-
0000003MNNNNMM333110003310000000003303300000000000
42-
0000000MNNNNMM103001000033000000330000300000000000
43-
033003000000MMM00003333003333303300330030000000000
44-
300033MMMMM0M3333300330030030333333033030000000000
45-
33000000MMM33333333333330300333003333D33000A000000
46-
3333300003MMM00000033D3303030033303033300000000000
47-
30333333033303000000003330330333303330000000000000
48-
3333D333333330000000000030000030030000000000000000
49-
00333333300300003333333300000000000000000000000000
50-
0000000000003333333333000000A00000000000000000000A
38+
E0000000M300EA3000000300011B1133000000000030000000
39+
00000000000M000330E0000100111100333333333300EEEE00
40+
E000000MMM00311000010001100100033000000000EEEEEE00
41+
0000003MNNNNMM3331100033100000E00033033000EFFFFEEE
42+
0000EEEMNNNNMM10300100003300000033000030EEFFFFEEE0
43+
0330E3EEEEEEMMM00003333003333303300330030EFFFEEEEE
44+
300E33MMMMMEM33L330033003333333333333303EFFEEF0000
45+
330EEEEEMMM3333333333D33033K303333L333330EFEFF0000
46+
33333EEEE3MMM000000L33K30333003D33333K300000000000
47+
3D333333E333E3000E00003330330333333330000000000000
48+
3333D333333330000000000030000030030000000000A00000
49+
0033333330030F0033333333000F0000000000000000000000
50+
000000000E0033333333330000000000000000000000000000

Assets/Scenes/InGame.unity

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7961,7 +7961,7 @@ MonoBehaviour:
79617961
- {fileID: 21300000, guid: 6bee12329789d06498d9efbf43125a38, type: 3}
79627962
- {fileID: 21300000, guid: f532883756b6f1a47982416a36437fc2, type: 3}
79637963
- {fileID: 21300000, guid: f89d12bd18db68f46ac146795493daad, type: 3}
7964-
- {fileID: 21300000, guid: 2a9a942a3dc771241a81022e8bfc1f7b, type: 3}
7964+
- {fileID: 21300000, guid: b93c9fbba8889e5419c26ddb2a6316eb, type: 3}
79657965
- {fileID: 21300000, guid: b422a68ac9d967f4ba3d06d7707e3892, type: 3}
79667966
- {fileID: 21300000, guid: 48853b64a25bd0b4ca3bb19260c643af, type: 3}
79677967
- {fileID: 21300000, guid: b08e570699f1c8a4f9cc388204aef3bc, type: 3}
@@ -7982,6 +7982,16 @@ MonoBehaviour:
79827982
- {fileID: 21300014, guid: e48ddf4fb7304ce4ab48711eb6617a57, type: 3}
79837983
- {fileID: 21300102, guid: e48ddf4fb7304ce4ab48711eb6617a57, type: 3}
79847984
- {fileID: 21300104, guid: e48ddf4fb7304ce4ab48711eb6617a57, type: 3}
7985+
- {fileID: 21300000, guid: ce44b67118439c145aa68bbeecf92d7a, type: 3}
7986+
- {fileID: 21300000, guid: 589ad35d2372fc24a8cb804d15c6f87f, type: 3}
7987+
- {fileID: 21300000, guid: 7df0c622fc0fc3a4f8b44340018c9ad0, type: 3}
7988+
- {fileID: 21300000, guid: 51564a1d82ed53b4da8c6568136a951c, type: 3}
7989+
- {fileID: 21300000, guid: e3aa99260b442b14087a2eeb08ac0306, type: 3}
7990+
- {fileID: 21300000, guid: a92c6ecca99317b43a9c42907227c12e, type: 3}
7991+
- {fileID: 21300000, guid: f22b932707676a54faf6433035a2ec93, type: 3}
7992+
- {fileID: 21300000, guid: b284e4999e5db844283cbdcfba1aad8a, type: 3}
7993+
- {fileID: 21300000, guid: 31eb0f45182afb94bb64af2722a58cbf, type: 3}
7994+
- {fileID: 21300000, guid: 3c9fe331726228e4fb20fc69d80ef001, type: 3}
79857995
mainBarObj: {fileID: 1183078789144197330}
79867996
loseUI: {fileID: 2110199068}
79877997
winUI: {fileID: 1514986757}

Assets/Scripts/Manager/Enum.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public enum TILE
3535
STONE_DECO2 = 'L',
3636
SEA_01 = 'M',
3737
SEA_02 = 'N',
38-
SEA_03 = 'O'
38+
SEA_03 = 'O',
39+
MARS = -1
3940
}
4041

4142
/*

Assets/Scripts/Manager/GameMng.cs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class GameMng : MonoBehaviour
1515
*/
1616
[HideInInspector]
1717
public int _gold = 0;
18-
[HideInInspector]
18+
[SerializeField]
1919
public int _food = 0;
2020
[HideInInspector]
2121
public int _nowMem = 0;
@@ -219,7 +219,7 @@ void Start()
219219
public void init()
220220
{
221221
_gold = 100;
222-
_food = 100;
222+
_food = 0;
223223
_nowMem = 0;
224224
_maxMem = 0;
225225

@@ -438,7 +438,7 @@ public void turnManage(int uniqueNumber)
438438
}
439439
else
440440
{
441-
countHungry = 0;
441+
countHungry = -1;
442442
//debuffImg.enabled = false;
443443
debuffImg.color = Color.clear;
444444
debufFoodIcon.SetActive(false);
@@ -1335,9 +1335,9 @@ public Sprite getObjSprite(int code)
13351335
case (int)TILE.SEA_01:
13361336
return objSprite[9];
13371337
case (int)TILE.SEA_02:
1338-
return objSprite[9];
1338+
return objSprite[38];
13391339
case (int)TILE.SEA_03:
1340-
return objSprite[9];
1340+
return objSprite[39];
13411341
case (int)UNIT.FOREST_WORKER:
13421342
return objSprite[12];
13431343
case (int)UNIT.FOREST_SOLDIER_0:
@@ -1374,6 +1374,22 @@ public Sprite getObjSprite(int code)
13741374
return objSprite[28];
13751375
case (int)UNIT.DESERT_WITCH_1:
13761376
return objSprite[29];
1377+
case (int)TILE.GRASS_TREE:
1378+
return objSprite[30];
1379+
case (int)TILE.GRASS_STONE:
1380+
return objSprite[31];
1381+
case (int)TILE.SAND_TREE:
1382+
return objSprite[32];
1383+
case (int)TILE.SAND_STONE:
1384+
return objSprite[33];
1385+
case (int)TILE.DIRT_TREE:
1386+
return objSprite[34];
1387+
case (int)TILE.DIRT_STONE:
1388+
return objSprite[35];
1389+
case (int)TILE.STONE_DECO1:
1390+
return objSprite[36];
1391+
case (int)TILE.STONE_DECO2:
1392+
return objSprite[37];
13771393
case (int)BUILT.MINE:
13781394
setMainInterface(true, false);
13791395
return objSprite[0];

Assets/Scripts/Manager/UnitMng.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public void Building(int cost, int index, int unitindex)
227227
if (GameMng.I._gold >= cost)
228228
{
229229
GameMng.I.selectedTile._unitObj._bActAccess = false;
230+
Debug.Log("1" + GameMng.I.selectedTile._unitObj._bActAccess + "unit " + GameMng.I.selectedTile._unitObj);
230231

231232
GameObject Child = Instantiate(builtObj[index - 200], GameMng.I.targetTile.transform) as GameObject;
232233
GameMng.I.targetTile._builtObj = Child.GetComponent<Built>();

Assets/Scripts/Tile/Tile.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ void Start()
2727
{
2828
tile = this.GetComponent<GameObject>();
2929

30-
if (this.tileuniquecode >= (int)TILE.GRASS_TREE) { this.tileSpriteRend.sprite = tiledecoSprite[this.tileuniquecode - (int)TILE.GRASS_TREE]; }
31-
else if (this._code >= (int)TILE.GRASS_START && this._code < (int)TILE.GRASS_TREE) { this.tileSpriteRend.sprite = tileSprite[this._code - (int)TILE.GRASS_START]; }
32-
else if (this._code < (int)TILE.CAN_MOVE) { this.tileSpriteRend.sprite = tileSprite[this._code]; }
30+
if (this.tileuniquecode >= (int)TILE.GRASS_START && this.tileuniquecode < (int)TILE.GRASS_TREE) { this.tileSpriteRend.sprite = tileSprite[this.tileuniquecode - (int)TILE.GRASS_START]; }
31+
else if (this.tileuniquecode >= (int)TILE.GRASS_TREE) { this.tileSpriteRend.sprite = tiledecoSprite[this.tileuniquecode - (int)TILE.GRASS_TREE]; }
32+
else if (this.tileuniquecode < (int)TILE.CAN_MOVE) { this.tileSpriteRend.sprite = tileSprite[this._code]; }
3333

3434
_name = "독도는";
3535
_desc = "우리땅";

Assets/Scripts/Unit/Unit.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class Unit : DynamicObject
1616

1717
public string _unitDesc; // 유닛 생성 시 나오는 설명
1818

19+
public bool _actdebuff = false;
20+
1921
/**
2022
* @brief 유닛 생성 대기 및 생성 함수
2123
*/
@@ -63,13 +65,14 @@ public void maintenance()
6365
NetworkMng.getInstance.SendMsg(string.Format("DIE_UNIT:{0}:{1}", PosX, PosZ));
6466
}
6567
}
66-
else if (GameMng.I.countHungry > (NetworkMng.getInstance.v_user.Count * 6))
68+
else if (GameMng.I.countHungry > (NetworkMng.getInstance.v_user.Count * 6) && !_actdebuff)
6769
{
6870
// 랜덤 행동불능 (확률 %)
6971
int percent = Random.Range(1, 100);
7072
if (percent > 80)
7173
{
7274
_bActAccess = false;
75+
_actdebuff = true;
7376
}
7477
}
7578
else if (GameMng.I.countHungry > (NetworkMng.getInstance.v_user.Count * 3))
@@ -78,8 +81,11 @@ public void maintenance()
7881
_hp -= 1;
7982
}
8083

81-
if (GameMng.I.countHungry >= 0)
84+
if (GameMng.I.countHungry < 0 && _actdebuff)
85+
{
8286
_bActAccess = true;
87+
_actdebuff = false;
88+
}
8389

8490
if (_hp < 1)
8591
{
4.06 KB
Loading

Assets/Sprites/hexagon-pack/PNG/Tiles/Sea/ui_sea_00.png.meta

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)