示例#1
0
    void ExitLevel()
    {
        if (entities != null)
        {
            foreach (IEntity ent in entities)
            {
                ent.Cleanup();
                ent.Kill();
            }
        }
        entities.Clear();
        entities = null;
        korokke  = null;
        if (pugs != null)
        {
            pugs.Clear();
            pugs = null;
        }

        if (spawners != null)
        {
            spawners.Clear();
            spawners = null;
        }

        if (OnLevelExit != null)
        {
            OnLevelExit();
        }
    }
示例#2
0
    void BuildGoal()
    {
        KorokkeConfig korokkeCfg = FindObjectOfType <KorokkeConfig>();

        Korokke korokkeInstance = Instantiate <Korokke>(korokkePrefab);

        korokkeInstance.Init(this);
        korokkeInstance.LoadData(korokkeCfg);
        AddEntity(korokkeInstance);

        DestroyImmediate(korokkeCfg.gameObject);
    }
示例#3
0
 // Specific lists/members addition/removal methods
 public void SetKorokke(Korokke theKorokke)
 {
     korokke = theKorokke;
 }