예제 #1
0
    void InitializeShipSpeedSelections()
    {
        for (int i = 0; i < System.Enum.GetValues(typeof(SpeedSetting)).Length; i++)
        {
            int a = i;

            _shipSpeedSettings.transform.GetChild(i)
            .GetComponent <Button>()
            .onClick
            .AddListener(() => CommandMapper.UpdateCurrentSpeed((SpeedSetting)a));
        }
    }