예제 #1
0
파일: Enemy.cs 프로젝트: faarseer/rune31
 void Awake()
 {
     player       = Player.instance;
     enmTotalPool = EnmTotalPool.instance;
     mgcTotalPool = MgcTotalPool.instance;
     magicViewer.GetComponent <MagicViewer>().OnHit += OnHitMagic;
     enemies = Enemies.instance;
 }
예제 #2
0
    private void Awake()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }
        instance = this;

        DontDestroyOnLoad(gameObject);
        string filepath = Application.dataPath + "/rune31/Scripts/GameData/" + "Enemy.json";
        string jsons    = File.ReadAllText(filepath);

        totalPool = JsonConvert.DeserializeObject <_Enemies>(jsons).Enemies;
    }