forked from TouchScript/TouchScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathITouchHitFactory.cs
More file actions
35 lines (31 loc) · 1.07 KB
/
Copy pathITouchHitFactory.cs
File metadata and controls
35 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* @author Valentin Simonov / http://va.lent.in/
*/
using UnityEngine;
namespace TouchScript.Hit
{
/// <summary>
/// A factory which is used to create instances of ITouchHit.
/// </summary>
public interface ITouchHitFactory
{
/// <summary>
/// Creates an instance of ITouchHit from value.
/// </summary>
/// <param name="value">Result of Physics.Raycast.</param>
/// <returns>An instance of ITouchHit.</returns>
ITouchHit GetTouchHit(RaycastHit value);
/// <summary>
/// Creates an instance of ITouchHit from value.
/// </summary>
/// <param name="value">Result of Physics2D.Raycast.</param>
/// <returns>An instance of ITouchHit.</returns>
ITouchHit GetTouchHit(RaycastHit2D value);
/// <summary>
/// Creates an instance of ITouchHit from value.
/// </summary>
/// <param name="value">Transform which has been hit.</param>
/// <returns>An instance of ITouchHit.</returns>
ITouchHit GetTouchHit(Transform value);
}
}