You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
712 B
24 lines
712 B
3 years ago
|
using ET.EventType;
|
||
|
|
||
|
namespace ET
|
||
|
{
|
||
|
public class PeopleMoveEnd_InCabin : AEvent<PeopleMoveEnd>
|
||
|
{
|
||
|
protected override void Run(PeopleMoveEnd args)
|
||
|
{
|
||
|
var people = args.People;
|
||
|
var unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene());
|
||
|
|
||
|
int behave = people.GetBehaveType();
|
||
|
var targetId = people.GetTargetId();
|
||
|
if (behave == ConstBehaveType.BEHAVE_PREPARE_CABIN)
|
||
|
{
|
||
|
var cabin = unit.GetGrandChild<Cabin>(targetId);
|
||
|
if (cabin != null)
|
||
|
{
|
||
|
CabinHelper.ArriveCabin(unit, people, cabin).Coroutine();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|