using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using GGTPlugin;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using Google.Protobuf;
using Tenders.Protobuf;
///
/// 回放
///
public class ReTenderPlay : MonoBehaviour
{
public List ReparenetGameObjects;
public List RePlayGameObjects;
public List putlab;
// public Hashtable ht;
// public Hashtable ht1;
// public Hashtable reht;
// public Hashtable reht1;
// public int maxFrame;
// public int reMaxFrame;
public DateTime date;
public DateTime reDate;
public string SGYQ;
public string filepath;
public static ReTenderPlay instance;
public float time;
public int step;
public bool flag = false;
public bool putflag;
public ShowTianqi st;
public ReTenderplayWnd rw;
public Image zhezhao;
public ReTenderplayData Hd = new ReTenderplayData(); //记录回放数据
public ReTenderplayData rd = new ReTenderplayData(); //加载回放数据
public bool flag_cun = false;
public int zengliang; //每一个回放的郑亮
public int ZhenSum; //每一个回放的总帧数
public int CurrentmaxZhen; //播放开始帧数
public static ReTenderPlay _instance;
void Awake()
{
_instance = this;
}
public void Start()
{
instance = this;
// ht = new Hashtable();
foreach (var VARIABLE1 in ReparenetGameObjects.SelectMany(VARIABLE => VARIABLE.GetComponentsInChildren(true)))
{
RePlayGameObjects.Add(VARIABLE1.gameObject);
}
foreach (var VARIABLE1 in ReparenetGameObjects.SelectMany(VARIABLE => VARIABLE.GetComponentsInChildren(true)))
{
RePlayGameObjects.Add(VARIABLE1.gameObject);
}
foreach (var VARIABLE1 in ReparenetGameObjects.SelectMany(VARIABLE => VARIABLE.GetComponentsInChildren
TenderClickTrigger.cs
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class TenderClickTrigger : MonoBehaviour, IPointerClickHandler, IPointerUpHandler
{
void Update()
{
}
public void OnPointerClick(PointerEventData eventData)
{
if(UIControl._instance.IsPlayBack&&ReTenderPlay._instance.flag==false)
{
//某些button不需要触发点击事件
if (gameObject.GetComponent())
{
switch (gameObject.name)
{
case "MoNi_DW":
break;
case "MoNi_Reset":
break;
case "YL_Reset":
break;
case "YL_SubmitData":
break;
case "YL_Cancel":
break;
default:
ReTenderPlay.instance.Hd.Ht.Add(ReTenderPlay.instance.ZhenSum+"_" + ReTenderPlay.instance.zengliang++, "[b]" + gameObject.GetComponent().ID);
break;
}
}
if (gameObject.GetComponent())
{
ReTenderPlay.instance.Hd.Ht.Add(ReTenderPlay.instance.ZhenSum + "_" + ReTenderPlay.instance.zengliang++, "[s]" + gameObject.GetComponent().ID + "|" + "[v]" + (int)gameObject.GetComponent().value);
}
if (gameObject.GetComponent())
{
//Debug.Log("@#@#"+gameObject.GetComponent().value+"#@#$#$"+(float)gameObject.GetComponent().value);
ReTenderPlay.instance.Hd.Ht.Add(ReTenderPlay.instance.ZhenSum + "_" + ReTenderPlay.instance.zengliang++, "[S]" + gameObject.GetComponent().ID+ "|" + "[V]" + (float)gameObject.GetComponent().value);
}
if(UIControl._instance.IsPlayBack&&ReTenderPlay._instance.flag==false&&UIControl._instance.isToogleType)
{
if (gameObject.GetComponent())
{
ReTenderPlay.instance.Hd.Ht.Add(ReTenderPlay.instance.ZhenSum + "_" + ReTenderPlay.instance.zengliang++, "[t]" + gameObject.GetComponent().ID+ "|" + "[tv]" + (bool)gameObject.GetComponent().isOn);
}
}
}
}
public void OnPointerUp(PointerEventData eventData)
{
if(UIControl._instance.IsPlayBack&&ReTenderPlay._instance.flag==false)
{
if (gameObject.GetComponent())
{
ReTenderPlay.instance.Hd.Ht.Add(ReTenderPlay.instance.ZhenSum + "_" + ReTenderPlay.instance.zengliang++, "[s]" + gameObject.GetComponent().ID + "|" + "[v]" + (int)gameObject.GetComponent().value);
}
if (gameObject.GetComponent())
{
ReTenderPlay.instance.Hd.Ht.Add(ReTenderPlay.instance.ZhenSum + "_" + ReTenderPlay.instance.zengliang++, "[S]" + gameObject.GetComponent().ID + "|" + "[V]" + (float)gameObject.GetComponent().value);
}
}
}
}
package spark.examples.scala.grammars.caseclasses
object CaseClass_Test00 {
def simpleMatch(arg: Any) = arg match {
case v: Int => "This is an Int"
case v: (Int, String)