mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-03-25 19:34:15 -05:00
44 lines
956 B
C#
44 lines
956 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace PkmnFoundations.Support
|
|
{
|
|
public abstract class TrendyPhraseBase
|
|
{
|
|
public TrendyPhraseBase(byte[] data)
|
|
{
|
|
Data = data;
|
|
}
|
|
|
|
private byte[] m_data;
|
|
public byte[] Data
|
|
{
|
|
get
|
|
{
|
|
return m_data;
|
|
}
|
|
set
|
|
{
|
|
if (m_data == value) return;
|
|
if (value == null)
|
|
{
|
|
m_data = null;
|
|
return;
|
|
}
|
|
|
|
if (value.Length != 8) throw new ArgumentException("Trendy phrase data must be 8 bytes.");
|
|
m_data = value.ToArray();
|
|
}
|
|
}
|
|
|
|
public override String ToString()
|
|
{
|
|
return Render("{0}");
|
|
}
|
|
|
|
public abstract String Render(String wordFormat);
|
|
}
|
|
}
|