using System;
using UnityEngine;

public class SalonScreenAutoPlay : MonoBehaviour
{
	public void Awake()
	{
		if (this.TargetObject != null)
		{
			Renderer component = this.TargetObject.GetComponent<Renderer>();
			if (component != null && component.material != null)
			{
				this.movie_tex_ = (component.material.mainTexture as MovieTexture);
			}
		}
		else
		{
			this.movie_tex_ = (base.GetComponent<Renderer>().material.mainTexture as MovieTexture);
		}
	}

	public void Start()
	{
		if (this.movie_tex_ != null && !this.movie_tex_.isPlaying)
		{
			this.movie_tex_.loop = true;
			this.movie_tex_.Play();
		}
	}

	public GameObject TargetObject;

	private MovieTexture movie_tex_;
}
