// point 0左 1右 2上 3下 public void setType(ShowType showType, DisappearType disappearType, String position) { String num1 = disappearType == DisappearType.DISAPPEAR_ORDER ? "0" : "1"; String num2 = (showType == ShowType.PERSON_AND_PERSON || showType == ShowType.PERSON_AND_THING) ? "1" : "0"; String num3 = (showType == ShowType.THING_AND_PERSON || showType == ShowType.PERSON_AND_PERSON) ? "1" : "0"; this.type = num1 + num2 + num3 + position; }
// 图片展示处理 private void getShowImageType() { //选择显示方式 this.currentShowType = randStatusContainer.getShowType(); //要显示的图片的地址 this.currentShowImages = randImages(this.currentShowType); this.currentDisappearType = randStatusContainer.getDisappearType(); this.currentSecondImagePoint = randStatusContainer.getSecondImagePoint(this.currentDisappearType); this.secondImageIndex = randStatusContainer.currentPosition; }
public DisappearType getDisappearType() { if (disappearTypeList.Count != 0) { int randIndex = random.Next(0, disappearTypeList.Count); DisappearType disappearType = disappearTypeList[randIndex]; disappearTypeList.RemoveAt(randIndex); return(disappearType); } return(DisappearType.DISAPPEAR_ORDER); }
public void Clear() { pointEndAction = angleEndAction = scaleEndAction = colorEndAction = alphaEndAction = sizeEndAction = null; pointList.Clear(); angleList.Clear(); scaleList.Clear(); colorList.Clear(); alphaList.Clear(); sizeList.Clear(); pointDelayTime = angleDelayTime = scaleDelayTime = colorDelayTime = alphaDelayTime = sizeDelayTime = 0; pointTime = angleTime = scaleTime = colorTime = alphaTime = sizeTime = 1; isLoop = isAutoPlay = isDisappear = isPause = isStop = false; disType = DisappearType.Destroy; }
/// <summary> /// 获取第二张图片的位置 /// </summary> /// <returns></returns> public Point getSecondImagePoint(DisappearType disappearType) { //if (disappearType == DisappearType.DISAPPEAR_ORDER) //{ //可以随机获取位置 int randIndex = random.Next(0, showPointList.Count - 1); this.setCurrentaPosition(randIndex + 1); return(showPointList[randIndex]); //} /* * else * { * //只能获取上下左右 * int randIndex = random.Next(0, showPointList.Count - 1); * return showPointList[randIndex]; * } */ }