Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс CTObjectFollower

Защищенные члены

void CTActor (int index, vector pos, vector orient, string type, array< string > items, string hands_item, CameraToolsMenu parent)
 
void ~CTActor ()
 
string GetActorType ()
 
void AddItem (string item)
 
void SetItems (array< string > items)
 
array< stringGetItems ()
 
void SetHandsItem (string item)
 
string GetHandsItem ()
 
void Reset ()
 

Защищенные данные

int m_Index
 
Widget m_Root
 
TextWidget m_IndexWidget
 
string m_HandsItem
 
ref array< stringm_Items
 
EntityAI m_HandsItemObj
 

Подробное описание

Конструктор(ы)

◆ ~CTActor()

void ~CTActor ( )
inlineprotected
31 {
32 delete m_FollowerRoot;
33 }

Методы

◆ AddItem()

void AddItem ( string item)
inlineprotected
43 {
44 PlayerBase p = PlayerBase.Cast( m_FollowedObject );
45 if( p.GetInventory().CreateAttachment( item ) )
46 m_Items.Insert( item );
47 }
ref array< string > m_Items
Definition CTActor.c:9
Definition EntityAI.c:95
Definition PlayerBaseClient.c:2

◆ CTActor()

void CTActor ( int index,
vector pos,
vector orient,
string type,
array< string > items,
string hands_item,
CameraToolsMenu parent )
inlineprotected
14 {
15 m_FollowerRoot = GetGame().GetWorkspace().CreateWidgets( "gui/layouts/camera_tools/event_tracker.layout", null );
16 m_FollowerButton = m_FollowerRoot.FindAnyWidget( "IconPanel" );
17 m_IndexWidget = TextWidget.Cast( m_FollowerRoot.FindAnyWidget( "Text" ) );
18 m_Index = index;
19 m_Position = pos;
21 m_Menu = parent;
22
23 m_IndexWidget.SetText( m_Index.ToString() );
24 m_FollowerRoot.SetHandler( this );
25 CreateFollowedObject( type );
27 SetItems( items );
28 }
vector m_Orientation
Definition BleedingSource.c:15
vector m_Position
Cached world position.
Definition Effect.c:41
ServerBrowserMenuNew m_Menu
Definition ServerBrowserTab.c:30
TextWidget m_IndexWidget
Definition CTActor.c:6
int m_Index
Definition CTActor.c:3
void SetItems(array< string > items)
Definition CTActor.c:49
void SetHandsItem(string item)
Definition CTActor.c:67
Definition EnWidgets.c:220
proto native CGame GetGame()

Перекрестные ссылки GetGame(), m_Menu, m_Orientation, m_Position, SetHandsItem() и SetItems().

Используется в ScriptedWidgetEventHandler::OnMouseButtonDown().

◆ GetActorType()

string GetActorType ( )
inlineprotected
36 {
37 if( m_FollowedObject )
38 return m_FollowedObject.GetType();
39 return "";
40 }

◆ GetHandsItem()

string GetHandsItem ( )
inlineprotected
82 {
83 return m_HandsItem;
84 }
string m_HandsItem
Definition CTActor.c:8

Перекрестные ссылки m_HandsItem.

◆ GetItems()

array< string > GetItems ( )
inlineprotected
63 {
64 return m_Items;
65 }

Перекрестные ссылки m_Items.

Используется в Reset().

◆ Reset()

void Reset ( )
inlineprotected
87 {
88 string type = m_FollowedObject.GetType();
89 DestroyFollowedObject();
90 CreateFollowedObject( type );
91
93 SetItems( GetItems() );
94 }
array< string > GetItems()
Definition CTActor.c:62

Перекрестные ссылки GetItems(), SetHandsItem() и SetItems().

◆ SetHandsItem()

void SetHandsItem ( string item)
inlineprotected
68 {
70 if ( m_HandsItemObj && m_FollowedObject)
71 {
72 HumanInventory.Cast( m_FollowedObject.GetInventory() ).LocalDestroyEntity( m_HandsItemObj );
73 GetGame().ObjectDelete( m_HandsItemObj );
74 }
75 if (item)
76 {
77 HumanInventory.Cast( m_FollowedObject.GetInventory() ).CreateInHands( item );
78 }
79 }
EntityAI m_HandsItemObj
Definition CTActor.c:11
inventory for plain man/human
Definition HumanInventory.c:10
proto native EntityAI CreateInHands(string typeName)
creates new entity in hands
override bool LocalDestroyEntity(notnull EntityAI item)
Definition HumanInventory.c:425

Перекрестные ссылки HumanInventory::CreateInHands(), GetGame() и HumanInventory::LocalDestroyEntity().

Используется в CTActor() и Reset().

◆ SetItems()

void SetItems ( array< string > items)
inlineprotected
50 {
51 m_Items = items;
52 PlayerBase p = PlayerBase.Cast( m_FollowedObject );
53 if( p )
54 {
55 foreach( string item : items )
56 {
57 p.GetInventory().CreateAttachment( item );
58 }
59 }
60 }

Используется в CTActor() и Reset().

Поля

◆ m_HandsItem

string m_HandsItem
protected

Используется в GetHandsItem().

◆ m_HandsItemObj

EntityAI m_HandsItemObj
protected

◆ m_Index

int m_Index
protected

◆ m_IndexWidget

TextWidget m_IndexWidget
protected

◆ m_Items

ref array<string> m_Items
protected

Используется в GetItems().

◆ m_Root

Widget m_Root
protected

Объявления и описания членов класса находятся в файле: