Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

AttributeBase

aa edited this page Oct 25, 2021 · 4 revisions

Namespace: Syadeu.Presentation.Attributes

public abstract class AttributeBase : ObjectBase, IAttribute

EntityDataBase 의 구성부입니다.

Inheritance: ObjectBase -> AttributeBase
Derived: asdasd
Implements: IAttribute

Overview

  • 1

Remarks

class 맴버 선언을 그리 추천하고 싶지 않지만, 필요에 의해 선언이 내부에 되었다면, 해당 값을 복사하여 인스턴스를 만들기 위해 ObjectBase.Copy() 을 override 하여 해당 값을 복사하여야합니다.

이 클래스를 상속받음으로서 새로운 어트리뷰트를 선언할 수 있습니다. 선언된 클래스는 EntityDataList 에 자동으로 타입이 등록되어 추가할 수 있게 됩니다.

AttributeProcessor 를 통해 이 구성부를 이용한 동작부를 선언할 수 있습니다. AttributeBaseAttributeProcessor 는 하나처럼 작동합니다.

Description

Examples

아래는 새로운 Attribute 를 작성하는 방법에 대해 설명합니다.

using Newtonsoft.Json;

// 간단히 AttributeBase 를 상속받는 것만으로,
// EntityWindow 에서 작성한 Attribute 를 추가하여 여러 EntityDataBase 를 상속받는
// 오브젝트들에게 추가할 수 있습니다.

// DisplayName Attribute 를 추가하여 EntityWindow 에 표시될
// 이름을 설정할 수 있습니다.
[System.ComponentModel.DisplayName("Attribute: TestAttribute")]
// 이 Attribute 에 설명을 추가합니다.
[ReflectionDescription(
	"This is TestAttribute Description!")]
public class TestAttribute : AttributeBase
{
    // JsonProperty 를 사용하여 맴버를 선언합니다.
    [JsonProperty(Order = 0, PropertyName = "TestInt")]
    private int m_TestInt = 0;
    
    // JsonSerializing 은 public 으로 marking 된 모든 맴버들을
    // serialize 하므로, 저장할 필요가 없는 데이터는
    // JsonIgnore 를 통해 무시될 수 있습니다.
    [JsonIgnore] public int TestInt => m_TestInt;
}

- Interfaces
- Enums
- Attributes
- Abstract Classes
- Classes
- Structs
- Exceptions

- Syadeu.Presentation
- Syadeu.Collections
- Syadeu.Collections.Converters
- Syadeu.Collections.Proxy
- Syadeu.Presentation.Proxy
- Syadeu.Presentation.Internal
- Syadeu.Presentation.Entities
- Syadeu.Presentation.Attributes
- Syadeu.Presentation.Components
- Syadeu.Presentation.Actions
- Syadeu.Presentation.Render
  • CameraData
  • CameraFrustum
  • IntersectionType
  • RenderSystem
  • WorldCanvasSystem
- Syadeu.Presentation.Data
  • DataContainerSystem
  • DataObjectBase
  • EntityAnimationClipEventData
- Syadeu.Presentation.Events

Clone this wiki locally