public static ICharacter Construct(ICharacterBuilder builder) { builder.AddCharacterAttr(); builder.AddGameObject(); builder.AddWeapon(); return(builder.GetResult()); }
// 建立 public void Construct(ICharacterBuilder theBuilder) { // 利用Builder產生各部份加入Product中 theBuilder.LoadAsset( ++m_GameObjectID ); theBuilder.AddOnClickScript(); theBuilder.AddWeapon(); theBuilder.SetCharacterAttr(); theBuilder.AddAI(); // 加入管理器內 theBuilder.AddCharacterSystem( m_PBDGame ); }
// 构建 public void Construct(ICharacterBuilder theBuilder) { // 利用Builder产生的各个部分加入Product中 theBuilder.LoadAsset(++m_GameObjectID); theBuilder.AddOnClickScript(); theBuilder.AddWeapon(); theBuilder.SetCharacterAttr(); theBuilder.AddAI(); // 加入管理器 theBuilder.AddCharacterSystem(m_RTSGame); }