private void SpawnBaggageObject() { BaggageObjectSpawnTimer += Time.deltaTime; if (BaggageObjectSpawnTimer >= BaggageObjectSpawnTime) { BaggageObjectSpawnTimer = 0f; GameObject obj = SerializeFieldResourceManager.Instance.GetInGame1BaggageObject(); obj.transform.SetParent(CuConveyorObject.transform); //obj.transform.localPosition = Vector3.zero; //obj.transform.localScale = Vector3.one; BaggageObject comp = obj.GetComponent <BaggageObject>(); comp.Initialize(2f, CCFront, 1); //BaggageObjectList.Add(comp); } }
override public void OnDrop(PointerEventData data) { if (IsMove == true) { // ミスなので、とりあえずカウントを増やさないようにしておく } else { BaggageObject obj = data.pointerDrag.GetComponent <BaggageObject>(); if (obj.GetBaggageType() == BaggageType) { CurrentBaggageCapacity += obj.GetBaggageValue(); } else { // ミスなので、とりあえずカウントを増やさないようにしておく } UpdateCurrentBaggageCapacityText(CurrentBaggageCapacity); } Destroy(data.pointerDrag); //Debug.Log(data.pointerDrag.name); Debug.Log("OnDrop"); }