EquipPart() 方法將角色身體大圖(5100×1200)與同尺寸武器大圖合成,組裝成帶武器的角色圖,最後按 150×150 尺寸切割儲存進 PartImage 交錯陣列:

public BitmapSource[,] Source { get; set; }
public int DirectionNum { get; set; }
public Actions Action { get; set; }
public Actions OldAction { get; set; }
public int[] EachActionFrameRange { get; set; }
public int DirectionFrameNum { get; set; }
public int CurrentStartFrame { get; set; }
public int CurrentEndFrame { get; set; }
public int TotalWidth { get; set; }
public int TotalHeight { get; set; }
public int SingleWidth { get; set; }
public int SingleHeight { get; set; }
public int[] Equipment { get; set; } // [0]衣服 [1]武器 [2]頭盔 ...
public enum Actions
{
Stop = 0, // 停止
Run = 1, // 跑動
Attack = 2, // 戰鬥
Magic = 3, // 施法
Death = 9, // 死亡
}
BitmapSource[,] Source 為 EquipPart() 回傳的圖片源,生命執行緒中呼叫顯示對應幀;Action、OldAction 為動作狀態枚舉。這些屬性奠定了八方向精靈系統的基礎。