Exemplo n.º 1
0
        /// <summary>
        /// ランダムに推進器を設定する
        /// </summary>
        public void SetRandomThruster(ShipStructure structure)
        {
            var thrusterCon = structure.ThrusterController;

            foreach (var t in thrusterCon.Coms)
            {
                ShipThruster thruster = thrusterList.Get();
                t.SetEquipment(Instantiate(thruster));
            }
        }
    // Add Thruster
    void AddThruster(Ship ship, ShipThruster thruster)
    {
        GameObject  shipObject = ship.gameObject;
        CmpThruster cmp        = shipObject.GetComponent <CmpThruster>();

        if (!cmp)
        {
            cmp = shipObject.AddComponent <CmpThruster>() as CmpThruster;
        }
        cmp.Add(thruster);
    }
Exemplo n.º 3
0
 public void Add(ShipThruster thruster)
 {
     Thrusters.Add(thruster);
 }