public ActivityStoryVo(ActivityPlotRulePB rule) { Rule = rule; ActivityId = rule.ActivityId; PlotId = rule.PlotId; OpenTime = rule.OpenTime; IsOpen = ClientTimer.Instance.GetCurrentTimeStamp() >= OpenTime; }
public override void SetData(params object[] paramsObjects) { StoryModel model = RegisterModel <StoryModel>(); model.Reset(); //这里还要赋值StoryType if (paramsObjects[0] is LevelVo) { model.Level = (LevelVo)paramsObjects[0]; _storyId = model.Level.StoryId; model.StoryType = StoryType.MainStory; } else if (paramsObjects[0] is AppointmentGateRuleVo) { //约会的关卡。 var gate = (AppointmentGateRuleVo)paramsObjects[0]; int appointmentid = (int)paramsObjects[1]; _storyId = gate.SceneId; Debug.Log(gate.Gate + " " + _storyId); _appointmentData = new[] { gate.Gate, appointmentid }; model.StoryType = StoryType.LoveAppointment; } else if (paramsObjects[0] is VisitLevelVo) { VisitLevelVo vo = (VisitLevelVo)paramsObjects[0]; model.VisitLevel = vo; _storyId = vo.StoryId; model.StoryType = StoryType.Visit; } else if (paramsObjects[0] is ActivityPlotRulePB) { ActivityPlotRulePB capsuleStoryRule = (ActivityPlotRulePB)paramsObjects[0]; _storyId = capsuleStoryRule.PlotId; //_storyId = "24-10"; model.StoryType = StoryType.ActivityCapsule; } else { _storyId = (string)paramsObjects[0]; if (_storyId == "0-1") { model.StoryType = StoryType.CreateUser; } } }
public ActivityCapsuleStoryRule(ActivityPlotRulePB data, int index = 0) { this.data = data; this.index = index; }