mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
26 lines
642 B
Python
26 lines
642 B
Python
from __future__ import annotations
|
|
|
|
from typing import Optional
|
|
|
|
from dcs import Point
|
|
from dcs.unitgroup import StaticGroup
|
|
|
|
from game.point_with_heading import PointWithHeading
|
|
from game.utils import Heading
|
|
|
|
|
|
class Helipad(PointWithHeading):
|
|
def __init__(self) -> None:
|
|
super(Helipad, self).__init__()
|
|
self.heading = Heading.from_degrees(0)
|
|
self.occupied = False
|
|
self.static_unit: Optional[StaticGroup] = None
|
|
|
|
@staticmethod
|
|
def from_point(point: Point, heading: Heading) -> Helipad:
|
|
h = Helipad()
|
|
h.x = point.x
|
|
h.y = point.y
|
|
h.heading = heading
|
|
return h
|