/// <summary> /// 初期化 /// </summary> public override void InitCom(ShipStructure structure) { base.InitCom(structure); if (equipment) { SetEquipment(equipment); } inited = true; }
/// <summary> /// 登録されている部品の初期化 /// </summary> private void InitComs(ShipStructure structure, T[] coms) { comDic = new Dictionary <string, T>(); foreach (var com in coms) { if (comDic.ContainsKey(com.name)) { continue; } comDic.Add(com.name, com); } foreach (var com in coms) { com.InitCom(structure); } }
/// <summary> /// 部品の初期化 /// </summary> public virtual void InitCom(ShipStructure structure) { this.structure = structure; }
/// <summary> /// 初期化 /// </summary> public override void InitCom(ShipStructure structure) { base.InitCom(structure); structure.Marker = this; detectableObj = GetComponent <DetectableObject2D>(); }
/// <summary> /// 初期化 /// </summary> public override void InitCom(ShipStructure structure) { base.InitCom(structure); structure.AttitudeController = this; }
/// <summary> /// 部品の初期化 /// </summary> public override void InitCom(ShipStructure structure) { base.InitCom(structure); InitComs(structure, coms); }
/// <summary> /// 初期化 /// </summary> public override void InitCom(ShipStructure structure) { base.InitCom(structure); structure.WeaponController = this; }
/// <summary> /// 初期化 /// </summary> public override void InitCom(ShipStructure structure) { base.InitCom(structure); structure.ThrusterController = this; }
/// <summary> /// 初期化 /// </summary> public override void InitCom(ShipStructure structure) { base.InitCom(structure); rBody2d = GetComponent <Rigidbody2D>(); }