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
3da70bd7
Commit
3da70bd7
authored
Jan 16, 2019
by
18김상언
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enemyAction 브랜치에 있는 EnemyManager 코드에서 수정된 부분을 훔쳐서 enemy 브랜치에서 건드리고 있는 EnemyManager 코드로 훔쳐왔다.
나중에 머지할 때 편하지 않을까 싶어서 훔쳤다.
parent
494ecc4f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
EnemyManager.cs
Assets/Scripts/Characters/EnemyManager.cs
+9
-1
No files found.
Assets/Scripts/Characters/EnemyManager.cs
View file @
3da70bd7
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Text
;
using
System.Text
;
using
UnityEngine
;
public
class
EnemyManager
:
Singleton
<
EnemyManager
>
public
class
EnemyManager
:
Singleton
<
EnemyManager
>
...
@@ -34,7 +35,7 @@ public class EnemyManager : Singleton<EnemyManager>
...
@@ -34,7 +35,7 @@ public class EnemyManager : Singleton<EnemyManager>
public
readonly
Dictionary
<
int
,
Dictionary
<
State
,
Action
>>
actionDictByID
;
public
readonly
Dictionary
<
int
,
Dictionary
<
State
,
Action
>>
actionDictByID
;
public
readonly
Dictionary
<
int
,
Dictionary
<
EnemyData
,
float
>>
enemyDataByID
;
public
readonly
Dictionary
<
int
,
Dictionary
<
EnemyData
,
float
>>
enemyDataByID
;
public
GameObject
enemyPrefab
;
// method
// method
// constructor
// constructor
protected
EnemyManager
()
protected
EnemyManager
()
...
@@ -118,4 +119,11 @@ public class EnemyManager : Singleton<EnemyManager>
...
@@ -118,4 +119,11 @@ public class EnemyManager : Singleton<EnemyManager>
enemyDataByID
.
Add
(
enemyID
,
EnemyInfo
);
enemyDataByID
.
Add
(
enemyID
,
EnemyInfo
);
}
}
}
}
// called by gameManager to Spawn enemy
// little temporary. Many change will be exist.
public
void
SpawnEnemy
()
{
Vector2
playerPosition
=
GameObject
.
Find
(
"Player"
).
transform
.
position
;
Instantiate
(
enemyPrefab
,
playerPosition
+
new
Vector2
(
7
,
0
),
Quaternion
.
identity
);
}
}
}
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