Ejemplo n.º 1
0
    void Awake()
    {
        my_renderer = GetComponent <MeshRenderer>();
        modules     = GetComponent <ShipModuleHolder>();
        roles       = GetComponent <ShipCrewRoleHolder>();
        my_orbit    = GetComponent <Orbit>();

        stats = new ShipStats(new Dictionary <ShipStatType, float>
        {
            { ShipStatType.MoveSpeed, 3.0f },
            { ShipStatType.CrewSeats, 0.0f }
        });
        stats.Get(ShipStatType.MoveSpeed).onChange += UpdateSpeed;
        stats.Get(ShipStatType.CrewSeats).onChange += UpdateCrewSlots;
    }