DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ObjectIsKindOf()

bool CGame::ObjectIsKindOf ( Object object,
string cfg_parent_name )
inlineprotected

Returns is object inherited from parent class name.

Аргументы
objectObject
cfg_parent_nameParent Config Class name ("DZ_LightAI")
Возвращает
bool is object inherited from parent class name
bool is_kind = g_Game.IsKindOf( my_animal, "DZ_LightAI");
>> 1
DayZGame g_Game
Определения DayZGame.c:4074
proto string ToString()
Obsolete Managed PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Определения EnScript.c:369

См. определение в файле Global/game.c строка 1489

1490 {
1491 TStringArray full_path = new TStringArray;
1492 ConfigGetObjectFullPath(object, full_path);
1493
1494 cfg_parent_name.ToLower();
1495
1496 int nFullPath = full_path.Count();
1497 for (int i = 0; i < nFullPath; i++)
1498 {
1499 string tmp = full_path.Get(i);
1500 tmp.ToLower();
1501 if (tmp == cfg_parent_name)
1502 {
1503 return true;
1504 }
1505 }
1506
1507 return false;
1508 }
proto native void ConfigGetObjectFullPath(Object obj, out TStringArray full_path)
class array< Class T > TStringArray
proto int ToLower()
Changes string to lowercase. Returns length.

Перекрестные ссылки ConfigGetObjectFullPath(), string::ToLower() и TStringArray.