Пример #1
0
 public void CompletePuzzle()
  {
      
      Debug.Log("Puzzle Complete!");
      GameObject.Destroy(this.gameObject);
      SceneManagement.GetInstance().PuzzleComplete(ParentMiniGame);
      
  }
Пример #2
0
    public void GetRewardItem()
    {
        IsComplete = true;
        Debug.Log(RewardItemData);
        UIManager.GetInstance().GetRewardUI(RewardItemData.ImagePath);

        foreach (var id in GameData.FindItem)
        {
            SceneManagement.GetInstance().DropItemformInventory(id.ToString());
        }
        InventoryManager.GetInstance().AddItem(GameData.Reward);
    }
Пример #3
0
    public void SetListFindItem(List <ItemsTable.Row> ListFindItem)
    {
        DestroyListItems();
        foreach (ItemsTable.Row item in ListFindItem)
        {
            GameObject obj = Instantiate(PrefabFinditem);
            obj.transform.SetParent(this.transform);

            Debug.Log(item.ID + "+---" + item.Name + "-->");
            obj.GetComponent <RectTransform>().localScale = Vector3.one;
            FindItems.Add(obj.GetComponent <FindItemControl>());
            bool MaskVisible = SceneManagement.GetInstance().PlayerData.Inventory.Contains(item.ID);
            Debug.Log(item.ID + "+---" + item.Name + "-->" + MaskVisible);
            obj.GetComponent <FindItemControl>().SetFindItemControl(item.ID, item.Name, MaskVisible);
        }
    }
Пример #4
0
    void Update()
    {
        if (!SceneManagement.GetInstance().CameraPlayer.working)
        {
            return;
        }
        Move();

        if (InZoneMiniGame && Input.GetKeyDown(KeyCode.E))
        {
            this.gameObject.SetActive(false);
            //SceneManagement.GetInstance().CameraPlayer.ChangeCameraMode(CameraFollowMode.FollowMiniGame);
            //SceneManagement.GetInstance().MiniGameActive = true;
            SceneManagement.GetInstance().CanClick = true;
        }
    }
Пример #5
0
    public void OnEndDrag(PointerEventData eventData)
    {
        transform.localPosition = Vector3.zero;

        RaycastHit hit = new RaycastHit();
        Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        if (Physics.Raycast(ray, out hit, 1000.0f))
        {
            Debug.DrawRay(transform.position, hit.point, Color.green);
            //Debug.Log(hit.transform.gameObject);
            MissionItemInterActive Item = hit.transform.gameObject.GetComponent <MissionItemInterActive>();
            Debug.Log(Item.ItemMissionComplete + "==" + parentItem.ID_Item);
            if (Item.ItemMissionComplete == parentItem.ID_Item)
            {
                Item.UnlockMisstion();
                SceneManagement.GetInstance().DropItemformInventory(Item.ItemMissionComplete);
            }
        }
    }
Пример #6
0
 public void UnlockMisstion()
 {
     SceneManagement.GetInstance().DropItemformInventory(ItemMissionComplete);
     ActiveEventMission();
 }