public static void InitDelegate() { if (CalculateOwnVehicles != null) { if (GetWorkBehaviour != null) { if (CalculateGuestVehicles != null) { if (CalculateGuestVehicles1 != null) { return; } } } } DebugLog.LogToFileOnly("Try to InitDelegate in RealCityCommonBuildingAI"); CalculateOwnVehicles = FastDelegateFactory.Create <CommonBuildingAICalculateOwnVehicles>(typeof(CommonBuildingAI), "CalculateOwnVehicles", instanceMethod: true); GetWorkBehaviour = FastDelegateFactory.Create <CommonBuildingAIGetWorkBehaviour>(typeof(CommonBuildingAI), "GetWorkBehaviour", instanceMethod: true); CalculateGuestVehicles = FastDelegateFactory.Create <CommonBuildingAICalculateGuestVehicles>(typeof(CommonBuildingAI), "CalculateGuestVehicles", instanceMethod: true); CalculateGuestVehicles1 = FastDelegateFactory.Create <CommonBuildingAICalculateGuestVehicles1>(typeof(CommonBuildingAI), "CalculateGuestVehicles", instanceMethod: true); }
public static void InitDelegate() { if (CalculateOwnVehicles != null) { return; } if (GetWorkBehaviour != null) { return; } if (CalculateGuestVehicles != null) { return; } if (CalculateGuestVehicles1 != null) { return; } CalculateOwnVehicles = FastDelegateFactory.Create <CommonBuildingAICalculateOwnVehicles>(typeof(CommonBuildingAI), "CalculateOwnVehicles", instanceMethod: true); GetWorkBehaviour = FastDelegateFactory.Create <CommonBuildingAIGetWorkBehaviour>(typeof(CommonBuildingAI), "GetWorkBehaviour", instanceMethod: true); CalculateGuestVehicles = FastDelegateFactory.Create <CommonBuildingAICalculateGuestVehicles>(typeof(CommonBuildingAI), "CalculateGuestVehicles", instanceMethod: true); CalculateGuestVehicles1 = FastDelegateFactory.Create <CommonBuildingAICalculateGuestVehicles1>(typeof(CommonBuildingAI), "CalculateGuestVehicles", instanceMethod: true); }