Esempio n. 1
0
        private void OnGUI()
        {
            EditorGUILayout.BeginVertical();
            DynamicObjectEditor.DynamicObjectConfig =
                EditorGUILayout.ObjectField("Config", DynamicObjectEditor.DynamicObjectConfig,
                                            typeof(DynamicObjectConfig)) as
                DynamicObjectConfig;
            EditorGUILayout.Space();
            var beginScrollView = EditorGUILayout.BeginScrollView(_scrollPosition, EditorStyles.helpBox);

            _scrollPosition = beginScrollView;
            if (DynamicObjectEditor.DynamicObjectConfig != null)
            {
                for (int i = 0; i < DynamicObjectEditor.DynamicObjectConfig.datas.Count; i++)
                {
                    EditorGUILayout.BeginHorizontal(EditorStyles.textArea);
                    DynamicObjectData dynamicObjectEditorData =
                        DynamicObjectEditor.DynamicObjectConfig.GetValueByIndex(i);
                    string key = dynamicObjectEditorData.key;
                    GUILayout.Label(key);
                    if (GUILayout.Button("Remove", GUILayout.Width(100)))
                    {
                        DynamicObjectEditor.Remove(key);
                        i--;
                    }

                    EditorGUILayout.EndHorizontal();
                }
            }

            EditorGUILayout.EndScrollView();
            EditorGUILayout.EndVertical();
        }
Esempio n. 2
0
        public override void ProcessValuesUpdate(Packet packet, UpdateMask updateMask)
        {
            base.ProcessValuesUpdate(packet, updateMask);

            var dynamicObjectUpdateMask = updateMask.LeftShift(ObjectData.BitCount);

            DynamicObjectData.ProcessValuesUpdate(packet, dynamicObjectUpdateMask);
        }
Esempio n. 3
0
        public DynamicObject(bool isWorldObject) : base(isWorldObject)
        {
            ObjectTypeMask |= TypeMask.DynamicObject;
            ObjectTypeId    = TypeId.DynamicObject;

            m_updateFlag.Stationary = true;

            m_dynamicObjectData = new DynamicObjectData();
        }