424 lines
14 KiB
C#
424 lines
14 KiB
C#
using System;
|
|
using System.Collections;
|
|
using IO;
|
|
using Manager;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x0200011D RID: 285
|
|
public class PhotoShootMonitor : MonitorBase
|
|
{
|
|
// Token: 0x0600092A RID: 2346 RVA: 0x0002316C File Offset: 0x0002236C
|
|
public override void Initialize(int playerIndex, bool isActive)
|
|
{
|
|
base.Initialize(playerIndex, isActive);
|
|
if (this.IsActive())
|
|
{
|
|
MechaManager.LedIf[playerIndex].ButtonLedReset();
|
|
}
|
|
this._menuButtonController.Initialize(playerIndex);
|
|
this._menuButtonController.SetVisible(false, new int[] { 1, 2, 3, 4, 5 });
|
|
this._userEntryIconSetPlate = Object.Instantiate<GameObject>(this._userEntryPrefab, this._userEntryObject.transform).GetComponent<UserEntryPlate>();
|
|
this._userEntryIconSetPlate.Initialize(playerIndex);
|
|
}
|
|
|
|
// Token: 0x0600092B RID: 2347 RVA: 0x000231EB File Offset: 0x000223EB
|
|
public void SetData(IPhotoShootProcess process)
|
|
{
|
|
this._photoController.Initialize(this.monitorIndex, process);
|
|
}
|
|
|
|
// Token: 0x0600092C RID: 2348 RVA: 0x000231FF File Offset: 0x000223FF
|
|
public override void ViewUpdate()
|
|
{
|
|
if (!this.isPlayerActive)
|
|
{
|
|
return;
|
|
}
|
|
this._photoController.ViewUpdate();
|
|
this._menuButtonController.ViewUpdate((float)GameManager.GetGameMSecAdd());
|
|
}
|
|
|
|
// Token: 0x0600092D RID: 2349 RVA: 0x00023226 File Offset: 0x00022426
|
|
public void PressedButton(InputManager.ButtonSetting buttonIndex)
|
|
{
|
|
this._menuButtonController.SetAnimationActive((int)buttonIndex);
|
|
}
|
|
|
|
// Token: 0x0600092E RID: 2350 RVA: 0x00023234 File Offset: 0x00022434
|
|
public void SetUserData(Texture2D icon, string userName, int rating, int dispRate, int totalAwake)
|
|
{
|
|
this._userEntryIconSetPlate.SetUserData(icon, userName, rating, dispRate, totalAwake);
|
|
}
|
|
|
|
// Token: 0x0600092F RID: 2351 RVA: 0x00023248 File Offset: 0x00022448
|
|
public void ChangeFrameName(string frameName)
|
|
{
|
|
this._photoController.ChangeFrameName(frameName);
|
|
}
|
|
|
|
// Token: 0x06000930 RID: 2352 RVA: 0x00023256 File Offset: 0x00022456
|
|
public void SetFirstInformation()
|
|
{
|
|
this._menuButtonController.SetVisible(false, new InputManager.ButtonSetting[] { InputManager.ButtonSetting.Button04 });
|
|
}
|
|
|
|
// Token: 0x06000931 RID: 2353 RVA: 0x0002326E File Offset: 0x0002246E
|
|
public void SetFirstInformationSkip()
|
|
{
|
|
this._menuButtonController.SetVisible(true, new InputManager.ButtonSetting[] { InputManager.ButtonSetting.Button04 });
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button04, 4);
|
|
}
|
|
|
|
// Token: 0x06000932 RID: 2354 RVA: 0x00023293 File Offset: 0x00022493
|
|
public void SetMenu2Wait()
|
|
{
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
}
|
|
|
|
// Token: 0x06000933 RID: 2355 RVA: 0x000232B2 File Offset: 0x000224B2
|
|
public void SetMaterial(Material shutterMaterial)
|
|
{
|
|
this._photoController.SetMaterial(shutterMaterial);
|
|
}
|
|
|
|
// Token: 0x06000934 RID: 2356 RVA: 0x000232C0 File Offset: 0x000224C0
|
|
public void SetPhotoCofirm(bool isActive, Action<int> messageAction, Action<int> onFinish)
|
|
{
|
|
base.StartCoroutine(this.SetShootCoroutine(isActive, messageAction, onFinish));
|
|
}
|
|
|
|
// Token: 0x06000935 RID: 2357 RVA: 0x000232D2 File Offset: 0x000224D2
|
|
private IEnumerator SetShootCoroutine(bool isActive, Action<int> messageAction, Action<int> onFinish)
|
|
{
|
|
if (isActive)
|
|
{
|
|
this._userEntryIconSetPlate.AnimHide();
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
if (messageAction != null)
|
|
{
|
|
messageAction(base.MonitorIndex);
|
|
}
|
|
yield return new WaitForSeconds(1f);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button04, 0);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button05, 1);
|
|
this._menuButtonController.SetVisible(true, new int[] { 3, 4 });
|
|
yield return new WaitForSeconds(0.3f);
|
|
if (onFinish != null)
|
|
{
|
|
onFinish(base.MonitorIndex);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (messageAction != null)
|
|
{
|
|
messageAction(base.MonitorIndex);
|
|
}
|
|
this._menuButtonController.SetVisible(false, new int[] { 3, 4 });
|
|
if (onFinish != null)
|
|
{
|
|
onFinish(base.MonitorIndex);
|
|
}
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06000936 RID: 2358 RVA: 0x000232F6 File Offset: 0x000224F6
|
|
public void SetContract(bool isActive, Action<int> messageAction, Action<int> onFinish)
|
|
{
|
|
base.StartCoroutine(this.SetContractCoroutine(isActive, messageAction, onFinish));
|
|
}
|
|
|
|
// Token: 0x06000937 RID: 2359 RVA: 0x00023308 File Offset: 0x00022508
|
|
private IEnumerator SetContractCoroutine(bool isActive, Action<int> messageAction, Action<int> onFinish)
|
|
{
|
|
if (isActive)
|
|
{
|
|
this._userEntryIconSetPlate.AnimHide();
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
if (messageAction != null)
|
|
{
|
|
messageAction(base.MonitorIndex);
|
|
}
|
|
yield return new WaitForSeconds(1f);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button04, 9);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button05, 10);
|
|
this._menuButtonController.SetVisible(true, new int[] { 3, 4 });
|
|
yield return new WaitForSeconds(0.3f);
|
|
if (onFinish != null)
|
|
{
|
|
onFinish(base.MonitorIndex);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (messageAction != null)
|
|
{
|
|
messageAction(base.MonitorIndex);
|
|
}
|
|
this._menuButtonController.SetVisible(false, new int[] { 3, 4 });
|
|
if (onFinish != null)
|
|
{
|
|
onFinish(base.MonitorIndex);
|
|
}
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06000938 RID: 2360 RVA: 0x0002332C File Offset: 0x0002252C
|
|
public void SetFrameSelectActive(bool isActive)
|
|
{
|
|
base.StartCoroutine(this.FrameSelectCoroutine(isActive));
|
|
}
|
|
|
|
// Token: 0x06000939 RID: 2361 RVA: 0x0002333C File Offset: 0x0002253C
|
|
private IEnumerator FrameSelectCoroutine(bool isActive)
|
|
{
|
|
if (isActive)
|
|
{
|
|
MechaManager.LedIf[this.monitorIndex].SetColor(0, Color.black);
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
this._photoController.SetMenu2FrameSelect(true);
|
|
yield return new WaitForSeconds(1f);
|
|
this._menuButtonController.SetVisible(true, new int[] { 4 });
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button04, 5);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button05, 3);
|
|
}
|
|
else
|
|
{
|
|
this._photoController.SetMenu2FrameSelect(false);
|
|
yield return new WaitForSeconds(0.5f);
|
|
this._menuButtonController.SetVisible(false, new int[] { 4 });
|
|
if (WebCamManager.IsAvailableCamera())
|
|
{
|
|
this._menuButtonController.SetVisible(true, new int[] { 5 });
|
|
}
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button04, 5);
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x0600093A RID: 2362 RVA: 0x00023352 File Offset: 0x00022552
|
|
public void SetFrameSelect2Cancel(bool toCancel, Action<int> callback)
|
|
{
|
|
base.StartCoroutine(this.FrameSelect2CancelCoroutine(toCancel, callback));
|
|
}
|
|
|
|
// Token: 0x0600093B RID: 2363 RVA: 0x00023363 File Offset: 0x00022563
|
|
private IEnumerator FrameSelect2CancelCoroutine(bool toCancel, Action<int> callback)
|
|
{
|
|
if (toCancel)
|
|
{
|
|
this._photoController.SetMenu2FrameSelect(false);
|
|
yield return new WaitForSeconds(0.6f);
|
|
if (callback != null)
|
|
{
|
|
callback(this.monitorIndex);
|
|
}
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
yield return new WaitForSeconds(1f);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button04, 0);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button05, 1);
|
|
this._menuButtonController.SetVisible(true, new int[] { 4, 5 });
|
|
}
|
|
else
|
|
{
|
|
MechaManager.LedIf[this.monitorIndex].SetColor(0, Color.black);
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
yield return new WaitForSeconds(1f);
|
|
this._menuButtonController.SetVisible(true, new int[] { 3, 4 });
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button04, 5);
|
|
this._menuButtonController.ChangeButtonSymbol(InputManager.ButtonSetting.Button05, 3);
|
|
this._photoController.SetMenu2FrameSelect(true);
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x0600093C RID: 2364 RVA: 0x00023380 File Offset: 0x00022580
|
|
public void SetFrameSelect2PhotoPreparation(bool isActive)
|
|
{
|
|
if (this._frameSelect2PhotoPreparation != null)
|
|
{
|
|
base.StopCoroutine(this._frameSelect2PhotoPreparation);
|
|
this._frameSelect2PhotoPreparation = null;
|
|
}
|
|
this._frameSelect2PhotoPreparation = base.StartCoroutine(this.SetFrameSelect2PhotoPreparationCoroutine(isActive));
|
|
}
|
|
|
|
// Token: 0x0600093D RID: 2365 RVA: 0x000233B0 File Offset: 0x000225B0
|
|
private IEnumerator SetFrameSelect2PhotoPreparationCoroutine(bool isActive)
|
|
{
|
|
if (isActive)
|
|
{
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
yield return this._photoController.SetFrameSelect2PhotoPreparation(true);
|
|
yield return new WaitForSeconds(0.5f);
|
|
this._menuButtonController.SetVisible(true, new int[] { 4 });
|
|
this._menuButtonController.SetPhotoShootingButton(true);
|
|
}
|
|
else
|
|
{
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
this._menuButtonController.SetPhotoShootingButton(false);
|
|
yield return this._photoController.SetFrameSelect2PhotoPreparation(false);
|
|
yield return new WaitForSeconds(0.5f);
|
|
this._menuButtonController.SetVisible(true, new int[] { 3, 4 });
|
|
}
|
|
this._frameSelect2PhotoPreparation = null;
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x0600093E RID: 2366 RVA: 0x000233C6 File Offset: 0x000225C6
|
|
public void SetPreparation2Photographing()
|
|
{
|
|
base.StartCoroutine(this.SetPreparation2PhotographingCoroutine());
|
|
}
|
|
|
|
// Token: 0x0600093F RID: 2367 RVA: 0x000233D5 File Offset: 0x000225D5
|
|
private IEnumerator SetPreparation2PhotographingCoroutine()
|
|
{
|
|
this._menuButtonController.SetVisible(false, new int[] { 3, 4 });
|
|
this._menuButtonController.SetPhotoShootingButton(false);
|
|
this._menuButtonController.SetActivePhotoShhtingButton();
|
|
yield return this._photoController.SetPreparation2Photographing();
|
|
yield return new WaitForSeconds(0.2f);
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x06000940 RID: 2368 RVA: 0x000233E4 File Offset: 0x000225E4
|
|
public void SetPhotographing2Adjustment()
|
|
{
|
|
this._menuButtonController.SetVisible(true, new int[] { 3, 4 });
|
|
this._photoController.SetPhotographing2Adjustment();
|
|
}
|
|
|
|
// Token: 0x06000941 RID: 2369 RVA: 0x0002340B File Offset: 0x0002260B
|
|
public void SetPhotoCountDown(int count)
|
|
{
|
|
this._photoController.SetPhotoCountDown(count);
|
|
}
|
|
|
|
// Token: 0x06000942 RID: 2370 RVA: 0x00023419 File Offset: 0x00022619
|
|
public void SetPhotoCountDown()
|
|
{
|
|
this._photoController.SetPhotoCountDown();
|
|
}
|
|
|
|
// Token: 0x06000943 RID: 2371 RVA: 0x00023426 File Offset: 0x00022626
|
|
public void Shoot()
|
|
{
|
|
this._photoController.Shoot();
|
|
}
|
|
|
|
// Token: 0x06000944 RID: 2372 RVA: 0x00023433 File Offset: 0x00022633
|
|
public void SetResultTexture(Vector2 size, Texture2D texture)
|
|
{
|
|
this._photoController.SetResultTexture(size, texture);
|
|
}
|
|
|
|
// Token: 0x06000945 RID: 2373 RVA: 0x00023442 File Offset: 0x00022642
|
|
public Texture2D GetCaptureTexture()
|
|
{
|
|
return this._photoController.GetCaptureTexture();
|
|
}
|
|
|
|
// Token: 0x06000946 RID: 2374 RVA: 0x0002344F File Offset: 0x0002264F
|
|
public void SetAdjustLength(int maxWidth, int maxHeight)
|
|
{
|
|
this._photoController.SetAdjustLength(maxWidth, maxHeight);
|
|
}
|
|
|
|
// Token: 0x06000947 RID: 2375 RVA: 0x0002345E File Offset: 0x0002265E
|
|
public void UpdateAdjustCapture(Vector2 v, int buttonIndex)
|
|
{
|
|
this._photoController.UpdateAdjustCapture(v, buttonIndex);
|
|
}
|
|
|
|
// Token: 0x06000948 RID: 2376 RVA: 0x0002346D File Offset: 0x0002266D
|
|
public void ResetAdjustPosition()
|
|
{
|
|
this._photoController.ResetAdjustPosition();
|
|
}
|
|
|
|
// Token: 0x06000949 RID: 2377 RVA: 0x0002347A File Offset: 0x0002267A
|
|
public void SetAdjust2Preparation()
|
|
{
|
|
this._photoController.SetAdjust2Preparation();
|
|
this._menuButtonController.SetPhotoShootingButton(true);
|
|
this._menuButtonController.SetVisible(false, new int[] { 3 });
|
|
}
|
|
|
|
// Token: 0x0600094A RID: 2378 RVA: 0x000234A9 File Offset: 0x000226A9
|
|
public void SetAdjust2Menu(Texture2D icon)
|
|
{
|
|
this._photoController.SetAdjust2Menu();
|
|
this._userEntryIconSetPlate.SetIconData(icon);
|
|
this._userEntryIconSetPlate.AnimIn();
|
|
}
|
|
|
|
// Token: 0x0600094B RID: 2379 RVA: 0x000234CD File Offset: 0x000226CD
|
|
public void SetPhotographing2Cleanup()
|
|
{
|
|
this._menuButtonController.SetVisible(false, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
|
|
this._photoController.SetPhotographing2Cleanup();
|
|
this._userEntryIconSetPlate.AnimLoop();
|
|
}
|
|
|
|
// Token: 0x0600094C RID: 2380 RVA: 0x00023502 File Offset: 0x00022702
|
|
public void CleanupUpdate(float rate)
|
|
{
|
|
this._photoController.CleanupUpdate(rate);
|
|
}
|
|
|
|
// Token: 0x0600094D RID: 2381 RVA: 0x00023510 File Offset: 0x00022710
|
|
public void Scroll(int buttonIndex, Texture2D texture, string frameName)
|
|
{
|
|
this.SlideScroll(buttonIndex, texture, frameName);
|
|
}
|
|
|
|
// Token: 0x0600094E RID: 2382 RVA: 0x0002351B File Offset: 0x0002271B
|
|
public void SlideScroll(int buttonIndex, Texture2D texture, string frameName)
|
|
{
|
|
this._photoController.Scroll(buttonIndex, frameName);
|
|
this._photoController.SetFrameSelectButtonAnimation(buttonIndex);
|
|
this._photoController.SetFrameTexture(texture);
|
|
}
|
|
|
|
// Token: 0x0600094F RID: 2383 RVA: 0x00023542 File Offset: 0x00022742
|
|
public void SetFrameVisible(bool isShow)
|
|
{
|
|
this._photoController.SetFrameVisible(isShow);
|
|
}
|
|
|
|
// Token: 0x06000950 RID: 2384 RVA: 0x00023550 File Offset: 0x00022750
|
|
public void SetFrameTexture(Texture2D currentTexture)
|
|
{
|
|
this._photoController.SetFrameTexture(currentTexture);
|
|
}
|
|
|
|
// Token: 0x0400073D RID: 1853
|
|
[SerializeField]
|
|
private PhotographingController _photoController;
|
|
|
|
// Token: 0x0400073E RID: 1854
|
|
[SerializeField]
|
|
[Header("ボタン管理")]
|
|
private MenuButtonController _menuButtonController;
|
|
|
|
// Token: 0x0400073F RID: 1855
|
|
[SerializeField]
|
|
[Header("ユーザー情報プレート")]
|
|
private GameObject _userEntryObject;
|
|
|
|
// Token: 0x04000740 RID: 1856
|
|
[SerializeField]
|
|
[Tooltip("ユーザーエントリー情報Prefab")]
|
|
private GameObject _userEntryPrefab;
|
|
|
|
// Token: 0x04000741 RID: 1857
|
|
private UserEntryPlate _userEntryIconSetPlate;
|
|
|
|
// Token: 0x04000742 RID: 1858
|
|
private Coroutine _frameSelect2PhotoPreparation;
|
|
}
|