Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
tetra-tower
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Oenos
tetra-tower
Commits
3b95427d
Commit
3b95427d
authored
Jan 03, 2019
by
15김민규
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug loadDropTable
parent
6418a996
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
EnemyManager.cs
Assets/Scripts/Characters/EnemyManager.cs
+12
-4
manifest.json
Packages/manifest.json
+5
-4
ProjectVersion.txt
ProjectSettings/ProjectVersion.txt
+1
-1
No files found.
Assets/Scripts/Characters/EnemyManager.cs
View file @
3b95427d
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
System.IO
;
using
System.Text
;
using
System
;
public
class
EnemyManager
:
Singleton
<
EnemyManager
>
{
public
enum
State
{
...
...
@@ -29,14 +32,19 @@ public class EnemyManager : Singleton<EnemyManager> {
string
tableLine
=
null
;
//파일 한 행
strReader
.
ReadLine
();
//첫 줄 스킵
while
(
tableLine
=
strReader
.
ReadLine
(
)
!=
null
)
while
(
(
tableLine
=
strReader
.
ReadLine
()
)
!=
null
)
{
if
(
string
.
IsNullOrEmpty
(
tableLine
))
return
;
//행이 비었는지 체크
cellValue
=
tableLine
.
Split
(
','
);
int
monsterID
=
cellValue
[
0
];
//monster가 가진 ID
int
itemID
=
cellValue
[
2
];
//드랍하는 item의 ID
int
dropWeight
=
cellValue
[
3
];
//드랍할 확률
uint
monsterID
=
0
;
int
itemID
=
0
,
dropWeight
=
0
;
uint
.
TryParse
(
cellValue
[
0
],
out
monsterID
);
int
.
TryParse
(
cellValue
[
2
],
out
itemID
);
int
.
TryParse
(
cellValue
[
3
],
out
dropWeight
);
int
[]
itemDrop
=
new
int
[]
{
itemID
,
dropWeight
};
dropTableByID
.
Add
(
monsterID
,
itemDrop
);
}
...
...
Packages/manifest.json
View file @
3b95427d
{
"dependencies"
:
{
"com.unity.ads"
:
"2.0.8"
,
"com.unity.analytics"
:
"2.0.16"
,
"com.unity.package-manager-ui"
:
"1.9.11"
,
"com.unity.ads"
:
"2.3.1"
,
"com.unity.analytics"
:
"3.2.2"
,
"com.unity.collab-proxy"
:
"1.2.15"
,
"com.unity.package-manager-ui"
:
"2.0.3"
,
"com.unity.purchasing"
:
"2.0.3"
,
"com.unity.textmeshpro"
:
"1.
2.4
"
,
"com.unity.textmeshpro"
:
"1.
3.0
"
,
"com.unity.modules.ai"
:
"1.0.0"
,
"com.unity.modules.animation"
:
"1.0.0"
,
"com.unity.modules.assetbundle"
:
"1.0.0"
,
...
...
ProjectSettings/ProjectVersion.txt
View file @
3b95427d
m_EditorVersion: 2018.
2
.0f2
m_EditorVersion: 2018.
3
.0f2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment