Commit fa1e1c3c authored by 15박보승's avatar 15박보승

BulletFactory 변경

parent 1c531be9
......@@ -11,16 +11,13 @@ public enum BulletCode
public class BulletFactory
{
public bool isInit = false;
public static GameObject truthBulletPrefab = null, fakeBulletPrefab = null, mirrorBulletPrefab = null;
private GameObject truthBulletPrefab = null, fakeBulletPrefab = null, mirrorBulletPrefab = null;
public BulletFactory()
public BulletFactory(GameObject truthBullet, GameObject fakeBullet, GameObject mirrorBullet)
{
if (isInit)
return;
truthBulletPrefab = Resources.Load<GameObject>("Prefabs/Bullets/TruthBullet");
fakeBulletPrefab = Resources.Load<GameObject>("Prefabs/Bullets/FakeBullet");
mirrorBulletPrefab = Resources.Load<GameObject>("Prefabs/Bullets/MirrorBullet");
truthBulletPrefab = truthBullet;
fakeBulletPrefab = fakeBullet;
mirrorBulletPrefab = mirrorBullet;
}
/// <summary>
......@@ -28,7 +25,7 @@ public class BulletFactory
/// </summary>
/// <param name="bulletCode">Type of bullet that wants to make</param>
/// <returns></returns>
public static Bullet MakeBullet(BulletCode bulletCode)
public Bullet MakeBullet(BulletCode bulletCode)
{
switch (bulletCode)
{
......
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