39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|