コード例 #1
0
    public CEquipment(CShip ship, E_EQUIPMENT_TYPE type)
    {
        m_equipmentName = "Equipment_" + ship.m_shipStats.equipmentAttachement +
                          "_" + type.ToString();
        m_equipmentType = type;

        m_parentShip = ship;
        //todo
    }
コード例 #2
0
ファイル: CShip.cs プロジェクト: aletowk/SpaceTurnProject
 public void AddEquipment(E_EQUIPMENT_TYPE type)
 {
     if (m_shipStats.equipmentAttachement < m_shipStats.maxEquipment)
     {
         CEquipment equip = new CEquipment(this, type);
         m_shipStats.equipmentAttachement++;
         m_equipmentList.Add(equip);
         equip.ApplyEquipment(this);
     }
     else
     {
         Debug.Log("Add weapon impossible, ship can only have " +
                   m_shipStats.maxWeapons);
     }
 }