public void Enter(GameObject guest) { CatchableGhost guestGhost = guest.GetComponent <CatchableGhost>(); foreach (var item in guestOrigins) { if (item.origin[0].name.Contains(guestGhost.id)) { Debug.Log("일치"); for (int i = 0; i < seatDatas.Length; i++) { Debug.Log(seatDatas[i]); if (seatDatas[i].isSeat == false) { seatDatas[i].guest = item.origin[i]; seatDatas[i].guestOrigin = guest.transform.parent.gameObject; seatDatas[i].guestOrigin.SetActive(false); seatDatas[i].isSeat = true; item.origin[i].SetActive(true); Debug.Log("작동"); return; } } return; } else { Debug.Log("불일치"); } } }
public void Spawn() { isLocate = false; GameObject testAqua = GameObject.Find("AquaLium"); fish = Instantiate(origin, point, Quaternion.identity).GetComponent <CatchableGhost>(); fish.transform.Rotate(0, 0, UnityEngine.Random.Range(-90, 90)); //fish.transform.Rotate(0, 0, UnityEngine.Random.Range(-90, 90)); inventory.gettingItem.Remove(origin.name); //Fish fish = Instantiate(inventory.Get(id), testAqua.transform.position, Quaternion.identity).GetComponent<Fish>(); }
public void OnCheckPoint() { if (!isCatched && ghostString == string.Empty) { return; } objectGenerater = GameObject.Find("AdvancedGenerator").GetComponent <ObjectGenerater>(); catchablePooler = objectGenerater.catchablePooler; returnGhost = catchablePooler.GetPool(ghostString).GetComponentInChildren <CatchableGhost>(); returnGhost.OnCheckPoint(); animator.SetBool("catched", false); PickUpGhost.SetActive(false); isCatched = false; ghostString = string.Empty; }
public void Init(CatchableGhost origin, string description, Inventory inventory) { this.origin = origin; this.inventory = inventory; this.description = description; }