-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMask.cs
More file actions
37 lines (33 loc) · 944 Bytes
/
Mask.cs
File metadata and controls
37 lines (33 loc) · 944 Bytes
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
36
using System;
namespace Dabrorius.MonoPunk
{
public class Mask
{
public Mask ()
{
}
/**
* Checks for collision with another Mask.
* @param mask The other Mask to check against.
* @return If the Masks overlap.
*/
public Boolean Collide(Mask mask)
{
/*
if (_check[mask._class] != null) return _check[mask._class](mask);
if (mask._check[_class] != null) return mask._check[_class](this);
*/
return false;
}
/** @private Collide against an Entity. */
/*
private function collideMask(other:Mask):Boolean
{
return parent.x - parent.originX + parent.width > other.parent.x - other.parent.originX
&& parent.y - parent.originY + parent.height > other.parent.y - other.parent.originY
&& parent.x - parent.originX < other.parent.x - other.parent.originX + other.parent.width
&& parent.y - parent.originY < other.parent.y - other.parent.originY + other.parent.height;
}
*/
}
}