Exemple #1
0
    public override void Awake()
    {
        base.Awake();
        settings = new ES3Settings(ES3.EncryptionType.AES);

        if (ES3.KeyExists("IsContinue", "Stage.es3"))
        {
            if (ES3.Load <bool>("IsContinue", "Stage.es3"))
            {
                this.StageLoadData();
            }

            else
            {
                this.NotSaveChpaterEnter();
            }
        }

        else
        {
            this.NotSaveChpaterEnter();
        }

        player = FindObjectOfType <CMovement>();
        portal = this.transform.Find("Portal").GetComponent <CPortal>();
        portal.SetChapterScene(this);
        this.MoveStage();
    }
Exemple #2
0
 public void Load(MapTemplate template)
 {
     foreach (var portal in template.Portals)
     {
         var entry = new CPortal()
         {
             nIdx   = portal.nIndex,
             nType  = (PortalType)portal.nPortalType,
             nX     = portal.nX,
             nY     = portal.nY,
             sName  = portal.sPortalName,
             sTName = portal.sTargetName,
             nTMap  = portal.nTargetMap
         };
         Portals.Add(entry);
     }
 }