MoTaForPSVita/Assets/Scripts/Controller/Environment/SpecialWallController3.cs

39 lines
1.0 KiB
C#
Raw Normal View History

2024-04-30 17:39:50 +08:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpecialWallController3 : MonoBehaviour
{
private void OnEnable()
{
GameManager.Instance.EventManager.OnResourceLoaded += OnLoaded;
}
private void OnDisable()
{
GameManager.Instance.EventManager.OnResourceLoaded -= OnLoaded;
}
private void OnLoaded()
{
// <20><><EFBFBD><EFBFBD><EFB5BD> 35 <20><> <20><><EFBFBD><EFBFBD>״̬ 1
if (GameManager.Instance.PlotManager.PlotDictionary[9] == 1)
{
// <20><><EFBFBD><EFBFBD> 2 ¥С͵
GameManager.Instance.ResourceManager.MakeResourceForLevel(2, EResourceType.Actor, 30, new Vector2(4, -5));
// <20>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>״̬
GameManager.Instance.PlotManager.PlotDictionary[9] = 2;
}
else if (GameManager.Instance.PlotManager.PlotDictionary[9] == 2)
{
return;
}
else
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
GameManager.Instance.PoolManager.RecycleResource(gameObject);
}
}
}