add movie player

master
tigerchen 6 years ago
parent ba03bcdcaf
commit 4da804c2c1
  1. 42
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity
  2. 14
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/movieController.cs
  3. 2
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/tuio_event.cs
  4. 2
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/New UltraCombos.DShowClip.asset

@ -413,6 +413,11 @@ PrefabInstance:
propertyPath: m_Pivot.y propertyPath: m_Pivot.y
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2142686115215515796, guid: 8bbc036a3be21954681613cbe4f0e9a8,
type: 3}
propertyPath: m_LocalScale.y
value: -1
objectReference: {fileID: 0}
- target: {fileID: 2829506254029656376, guid: 8bbc036a3be21954681613cbe4f0e9a8, - target: {fileID: 2829506254029656376, guid: 8bbc036a3be21954681613cbe4f0e9a8,
type: 3} type: 3}
propertyPath: tuio_event propertyPath: tuio_event
@ -461,7 +466,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 600} m_AnchoredPosition: {x: 0, y: 600}
m_SizeDelta: {x: 2585, y: 1200} m_SizeDelta: {x: 2527, y: 1200}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &503604497 --- !u!114 &503604497
MonoBehaviour: MonoBehaviour:
@ -786,7 +791,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -600} m_AnchoredPosition: {x: 0, y: -600}
m_SizeDelta: {x: 2585, y: 1200} m_SizeDelta: {x: 2527, y: 1200}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &797223805 --- !u!114 &797223805
MonoBehaviour: MonoBehaviour:
@ -1147,6 +1152,39 @@ GameObject:
type: 3} type: 3}
m_PrefabInstance: {fileID: 490275147} m_PrefabInstance: {fileID: 490275147}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &1996081109
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1996081105}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03dae28dfe6734f4eb76c922ac72dd34, type: 3}
m_Name:
m_EditorClassIdentifier:
target: 0
materials: []
attributeName:
targetObject: {fileID: 1996081105}
--- !u!114 &1996081110
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1996081105}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 10f07b3f9fb96524db93eb42d89c229c, type: 3}
m_Name:
m_EditorClassIdentifier:
VideoAsset: {fileID: 11400000, guid: 232980c200b699741a54e99e165d86a2, type: 2}
LoadOnAwake: 1
PlayOnStart: 1
Looping: 1
AudioVolume: 0
--- !u!1 &2044104306 --- !u!1 &2044104306
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

@ -1,10 +1,14 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI; using UnityEngine.UI;
using UltraCombos;
public class movieController : MonoBehaviour public class movieController : MonoBehaviour
{ {
//[RequireComponent(typeof(DShowMoviePlayer))]
DShowMoviePlayer player;
public float totalTime = 0.5f; public float totalTime = 0.5f;
public int id; public int id;
public tuio_event tuio_event; public tuio_event tuio_event;
@ -12,9 +16,15 @@ public class movieController : MonoBehaviour
public int stat; public int stat;
float c; float c;
Vector2 pos, pre_pos; Vector2 pos, pre_pos;
void Awake()
{
player = GetComponent<DShowMoviePlayer>();
}
void Start() void Start()
{ {
//player = GetComponent<DShowMoviePlayer>();
GetComponent<RawImage>().color = Color.clear; GetComponent<RawImage>().color = Color.clear;
pos = Vector2.zero; pos = Vector2.zero;
} }
@ -61,10 +71,12 @@ public class movieController : MonoBehaviour
stat = 1; stat = 1;
c = 0f; c = 0f;
Debug.Log("Hi"); Debug.Log("Hi");
player.Frame = (uint)Random.Range(0, player.TotalNumFrames);
} }
private void OnDestroy() private void OnDestroy()
{ {
Debug.Log("Bye"); Debug.Log("Bye");
player.Stop();
} }
} }

@ -70,7 +70,7 @@ public class tuio_event : MonoBehaviour
void reset_id() void reset_id()
{ {
GameObject[] objs = GameObject.FindGameObjectsWithTag("onFoot"); GameObject[] objs = GameObject.FindGameObjectsWithTag("onFoot");
Debug.Log(objs.Length); //Debug.Log(objs.Length);
for (int i = 0; i < objs.Length; i++) for (int i = 0; i < objs.Length; i++)
{ {
objs[i].GetComponent<movieController>().id = i - 1; objs[i].GetComponent<movieController>().id = i - 1;

@ -13,5 +13,5 @@ MonoBehaviour:
m_Name: New UltraCombos.DShowClip m_Name: New UltraCombos.DShowClip
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_VideoLocation: 1 m_VideoLocation: 1
m_VideoPath: ..\..\_Deploy_PC\08_DarkSea\Material\Video_buttombracket.avi m_VideoPath: ..\..\..\..\_Deploy_PC\08_DarkSea\Material\Video_buttombracket.avi
animationClip: {fileID: 0} animationClip: {fileID: 0}

Loading…
Cancel
Save