quickoutline
This commit is contained in:
@@ -10,21 +10,42 @@ namespace RebootReality.jelycho.Items {
|
||||
class ItemActorData : IActorData {
|
||||
public ItemConfig Config;
|
||||
|
||||
public void Serialize(FastBufferWriter writer) {
|
||||
}
|
||||
public void Deserialize(FastBufferReader reader) {
|
||||
}
|
||||
public void Serialize(FastBufferWriter writer) { }
|
||||
public void Deserialize(FastBufferReader reader) { }
|
||||
}
|
||||
|
||||
|
||||
[field: SerializeField] public ItemConfig Config { get; private set; }
|
||||
|
||||
[SerializeField] Outline m_Outline;
|
||||
|
||||
//
|
||||
// @MARK: Unity callbacks
|
||||
//
|
||||
void Awake() {
|
||||
SetHighlight(false);
|
||||
}
|
||||
|
||||
//
|
||||
// @MARK: Actor
|
||||
//
|
||||
protected override IActorData CreateActorData() {
|
||||
return new ItemActorData {
|
||||
Config = Config
|
||||
};
|
||||
}
|
||||
|
||||
public void Interact() {
|
||||
//
|
||||
// @MARK: IInteractable
|
||||
//
|
||||
public void SetHighlight(bool highlight) {
|
||||
if (m_Outline == null) {
|
||||
s_Logger.Error("ItemActor does not have an Outline component.");
|
||||
return;
|
||||
}
|
||||
|
||||
m_Outline.enabled = highlight;
|
||||
}
|
||||
|
||||
public void Interact() { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user