Пример #1
0
    void Start()
    {
        string ghostPath = PlayerPrefs.GetString("LatestShopPath");

        try
        {
            if (string.IsNullOrWhiteSpace(ghostPath))
            {
                PlayFabFacade.AllData.InfoResultPayload.TitleData.TryGetValue("DefaultShopGhost", out ghostPath);
            }

            GhostPath.FromString(ghostPath);
            if (GhostPath.HasPath)
            {
                var ghost  = Instantiate(GhostPlayerPrefab, Vector3.left * 10000, Quaternion.identity);
                var script = ghost.GetComponent <GhostPlayerScript>();
                script.Wander(GhostPath, 2.0f + Random.value * 5);
            }
        }
        catch (System.Exception) {}

        bool showChest = Random.value < 0.5f;

        Chest.SetActive(showChest);

        anim_ = GetComponentInChildren <SpriteAnimator_Single>();
        GameEvents.OnPlayerEnteredPortal += GameEvents_OnPlayerEnteredPortal;
        CreateItemData();
        InitDisplays(level: 1);
    }
Пример #2
0
 void Start()
 {
     Instance   = this;
     anim_      = GetComponent <SpriteAnimator_Single>();
     transform_ = transform;
     UpdateNotifyText();
     QuestCanvas.gameObject.SetActive(false);
 }