コード例 #1
0
    public void OnCabinItemClick()
    {
        if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))
        {
            shopMain.PurchasePart(this);
        }
        shopMain.ClearPartAttributes();
        shopMain.SelectPart(this);
        PartCabin _cabin = (PartCabin)partItem;

        shopMain.AddPartAttribute("Cabin Type:", _cabin.PartName);
        shopMain.AddPartAttribute("Crew Capacity:", _cabin.CrewCapacity.ToString());
        shopMain.AddPartAttribute("Fuel Efficiency:", _cabin.FuelEfficiency.ToString());
        shopMain.AddPartAttribute("Weight:", _cabin.Weight.ToString());
    }