private Texture GetTextureData(int id, StageBackgroundType type) { List<StageBackground.BackgroundImage> list = StageBackground.GetBgImageListGroupByImgGroupId(id).Where(val => val.bgImgPosType == type).ToList(); return list.Count > 1 ? list[UnityEngine.Random.Range(0, list.Count - 1)].bgImg : list.Count == 1 ? list[0].bgImg : null; }
public BackgroundImage(Stage i_stg, int i_groupId, StageBackgroundType i_pos, Texture i_tex, float i_spd, bool i_flag) { bgImgStage = i_stg; bgImgGroupId = i_groupId; bgImgPosType = i_pos; bgImg = i_tex; bgSpeed = i_spd; bgRandFlag = i_flag; }