Beispiel #1
0
 public void Init(SpreadConfig cfg)
 {
     config           = cfg;
     additionalSpread = Vector3.zero;
 }
 private void InitSpread(Message msg)
 {
     _spreadConfig = ObjectData.ParseObjectData <SpreadConfig>(msg.Data);
 }
Beispiel #3
0
 /// <summary>
 /// 新增推广信息
 /// </summary>
 /// <param name="config">推广配置</param>
 /// <returns></returns>
 public int InsertSpreadConfig(SpreadConfig config)
 {
     return(aideTreasureData.InsertSpreadConfig(config));
 }
Beispiel #4
0
 /// <summary>
 /// 修改推广信息
 /// </summary>
 /// <param name="config">推广配置</param>
 /// <returns></returns>
 public int UpdateSpreadConfig(SpreadConfig config)
 {
     return(aideTreasureData.UpdateSpreadConfig(config));
 }
Beispiel #5
0
 private static float CalcNextX(float currentX, SpreadConfig config)
 {
     return(currentX + config.ItemWidth + config.ItemMargin);
 }
Beispiel #6
0
 private static float CalcNextZ(float currentZ, SpreadConfig config)
 {
     return(currentZ += config.ItemMargin);
 }
Beispiel #7
0
 private static float CalcStartXWithShift(SpreadConfig config)
 {
     return(CalcStartX(config) + config.ItemWidth);
 }
Beispiel #8
0
 private static float CalcStartX(SpreadConfig config)
 {
     return((-config.ScreenWidth / 2) + config.ItemWidth / 2);
 }
Beispiel #9
0
 private static bool IsRowShift(int rawCount, SpreadConfig config)
 {
     return(config.RawShift && rawCount % 2 == 0);
 }
Beispiel #10
0
 private static bool IsEndOfLine(int itemsInRaw, SpreadConfig config)
 {
     return(itemsInRaw % config.ItemsPerRaw == 0);
 }
Beispiel #11
0
 private static float CalcStartZ(SpreadConfig config)
 {
     return(config.ScreenHeight / 2);;
 }