コード例 #1
0
    /// <summary>
    /// Adds the room's stats to the ship's total
    /// </summary>
    public void AddRoomStats()
    {
        shipStats.roomBeingPlaced          = gameObject;
        shipStats.Credits                 += -price[roomLevel - 1];
        shipStats.Payout                  += credits;
        shipStats.Energy                  += new Vector3(energy, energy, energy);
        shipStats.Energy                  += new Vector3(-minPower[roomLevel - 1], 0, -minPower[roomLevel - 1]);
        shipStats.Security                += security;
        shipStats.ShipWeapons             += shipWeapons;
        shipStats.CrewCurrent             += new Vector3(crew, crew, crew);
        shipStats.Food                    += food;
        shipStats.FoodPerTick             += foodPerTick;
        shipStats.ShipHealthCurrent       += new Vector2(shipHealth, shipHealth);
        MoraleManager.instance.CrewMorale += morale;

        AnalyticsManager.AddRoomForAnalytics(this);
    }