Tanoda
OnDraggedBelt.cs
Go to the documentation of this file.
1
using
System.Collections;
2
using
System.Collections.Generic;
3
using
GILES
.
Interface
;
4
using
UnityEngine
;
5
using
UnityEngine
.
UI
;
6
7
public
class
OnDraggedBelt
: MonoBehaviour
8
{
9
public
bool
good
=
true
;
10
public
RawImage
updateImage
;
11
private
GameObject cached;
12
13
void
OnSimpleDragAndDropEvent(
DragAndDropCell
.
DropEventDescriptor
desc)
14
{
15
if
(
good
)
16
{
17
ConveyorBeltManager
.
instance
.SpawnGood = desc.item.GetComponent<
pb_PrefabBrowserItemButton
>().asset;
18
}
19
else
20
{
21
cached = desc.item.GetComponent<
pb_PrefabBrowserItemButton
>().asset;
22
}
23
24
if
(
updateImage
&& desc.item.GetComponentInChildren<RawImage>())
25
{
26
updateImage
.texture = desc.item.GetComponentInChildren<RawImage>().texture;
27
}
28
desc.permission =
false
;
29
}
30
31
public
void
AddToBadSpawn
()
32
{
33
if
(cached)
34
{
35
ConveyorBeltManager
.
instance
.AddBad(cached);
36
}
37
}
38
39
public
void
ClearList
()
40
{
41
ConveyorBeltManager
.
instance
.ClearBad();
42
}
43
}
ConveyorBeltManager
Definition:
ConveyorBeltManager.cs:17
DragAndDropCell.DropEventDescriptor
Definition:
DragAndDropCell.cs:29
DragAndDropCell
Every item's cell must contain this script
Definition:
DragAndDropCell.cs:12
GILES.Interface.pb_PrefabBrowserItemButton
Definition:
pb_PrefabBrowserItemButton.cs:31
GILES.pb_MonoBehaviourSingleton.instance
static T instance
Definition:
pb_MonoBehaviourSingleton.cs:28
OnDraggedBelt
Definition:
OnDraggedBelt.cs:8
OnDraggedBelt.good
bool good
Definition:
OnDraggedBelt.cs:9
OnDraggedBelt.AddToBadSpawn
void AddToBadSpawn()
Definition:
OnDraggedBelt.cs:31
OnDraggedBelt.updateImage
RawImage updateImage
Definition:
OnDraggedBelt.cs:10
OnDraggedBelt.ClearList
void ClearList()
Definition:
OnDraggedBelt.cs:39
GILES.Interface
Definition:
pb_AutoStageItemEditor.cs:9
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine.UI
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
SimpleDragAndDrop
Scripts
OnDraggedBelt.cs
Generated by
1.9.3