-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBSObject.cs
More file actions
33 lines (28 loc) · 1.29 KB
/
BSObject.cs
File metadata and controls
33 lines (28 loc) · 1.29 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
namespace BSVisionCalculator
{
public abstract class BSObject
{
public VisionCalculationSituation situation;
// The main purpose of this class is to be a common super class of walls and bloqs
public double anglevalue_left;
public double anglevalue_right;
public double anglevalue_top;
public double anglevalue_bottom;
// An anglevalue is not an angle, but they can be compared like angles are. They are effectively the tangents of angles.
public static double calculateAngleValue(double measure_object, double measure_player, double z)
{
return (measure_object - measure_player) / z;
}
public abstract void updatePosition(VisionCalculationSituation situation);
public abstract void updateDepth(VisionCalculationSituation situation);
public abstract void updateAngleValues(VisionCalculationSituation situation);
public void updateSituation(VisionCalculationSituation situation)
{
this.situation = situation;
this.updateDepth(situation);
this.updatePosition(situation);
this.updateAngleValues(situation);
}
public abstract bool checkSpawning(VisionCalculationSituation situation);
}
}