using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
public class VideoCrol : MonoBehaviour {
public static VideoCrol instance;
private VideoPlayer vPlayer;
public GameObject videoImage;//播放image
private Button BtnPlay, BtnPause, BtnReStart;//开始,暂停,重播
public Slider sliderVideo;//进度条
private Button BtnX;//关闭
private Image VideoPanel;//视频背景
private Text NowTime;//播放时间
private Text TotalTime;//总时间
private float tt;//视频总时长
private float Index_t;//进度条计时时间
private float hour, min, second;
private bool IsPlay = true;
void Awake()
{
instance = this;
vPlayer = videoImage.GetComponent();
BtnPlay = GameObject.Find("Kaishi").GetComponent
同时还有另外一个脚本用来控制Slider的拖动和拖拽(两个接口,拖动和点击)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class SliderChange : MonoBehaviour,IDragHandler,IPointerClickHandler
{
///
/// 拖动改变视频进度
///
///
public void OnDrag(PointerEventData eventData)
{
VideoCrol.instance.ChangeVideo(VideoCrol.instance.sliderVideo.value);
}
///
/// 点击改变视频进度
///
///
public void OnPointerClick(PointerEventData eventData)
{
VideoCrol.instance.ChangeVideo(VideoCrol.instance.sliderVideo.value);
}
}
ArcgisEngine实现对地图的放大、缩小和平移:
个人觉得是平移,不过网上的都是漫游,通俗的说就是把一个地图对象从一边拉到另一边而已。就看人说话吧.
具体实现:
一、引入命名空间
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Controls;
二、代码实现.
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of th