Tanoda
DropArea.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections.Generic;
3
using
UnityEngine
;
4
5
public
class
DropArea
: MonoBehaviour
6
{
7
public
List<DropCondition>
DropConditions
=
new
List<DropCondition>();
8
public
event
Action<MouseDragBehaviour>
OnDropHandler
;
9
10
public
bool
Accepts
(
MouseDragBehaviour
draggable)
11
{
12
return
DropConditions
.TrueForAll(cond => cond.Check(draggable));
13
}
14
15
public
void
Drop
(
MouseDragBehaviour
draggable)
16
{
17
if
(draggable)
18
{
19
OnDropHandler
?.Invoke(draggable);
20
}
21
22
}
23
}
DropArea
Definition:
DropArea.cs:6
DropArea.OnDropHandler
Action< MouseDragBehaviour > OnDropHandler
Definition:
DropArea.cs:8
DropArea.DropConditions
List< DropCondition > DropConditions
Definition:
DropArea.cs:7
DropArea.Drop
void Drop(MouseDragBehaviour draggable)
Definition:
DropArea.cs:15
DropArea.Accepts
bool Accepts(MouseDragBehaviour draggable)
Definition:
DropArea.cs:10
MouseDragBehaviour
Definition:
MouseDragBehaviour.cs:12
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Scripts
Collector
DropArea.cs
Generated by
1.9.3