MoTaForPSVita/Assets/Scripts/Controller/Enemies/VampireController.cs

54 lines
2.1 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 VampireController : EnemyController
{
private void OnEnable()
{
GameManager.Instance.EventManager.OnVampireShow?.Invoke();
OnDeath += () =>
{
// ˵<><CBB5>
GameManager.Instance.UIManager.ShowDialog(GetComponent<ResourceController>().Name, new List<string> { "<22>ޣ<EFBFBD><DEA3>ϵۣ<CFB5><DBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳû<D2B2><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ࡣ", "<22><>Ȼ<EFBFBD><C8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>ʦ<EFBFBD><CAA6>˵<EFBFBD><EFBFBD><E3BBB9>̫<EFBFBD><CCAB><EFBFBD>ˡ<EFBFBD>" }, () =>
{
// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ
Vector2 point = new Vector2();
// <20><><EFBFBD>ɴ<EFBFBD>Ѫƿ
for (int i = 0; i < 3; i++)
{
point.Set(-1 + i, -2);
GameManager.Instance.PoolManager.GetResourceInFreePool(EResourceType.Item, 6).transform.position = point;
}
// <20><><EFBFBD>ɺ챦ʯ
for (int i = 0; i < 3; i++)
{
point.Set(-2, 1 - i);
GameManager.Instance.PoolManager.GetResourceInFreePool(EResourceType.Item, 7).transform.position = point;
}
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʯ
for (int i = 0; i < 3; i++)
{
point.Set(2, 1 - i);
GameManager.Instance.PoolManager.GetResourceInFreePool(EResourceType.Item, 8).transform.position = point;
}
// <20><><EFBFBD>ɻ<EFBFBD>Կ<EFBFBD><D4BF>
for (int i = 0; i < 3; i++)
{
point.Set(-1 + i, 2);
GameManager.Instance.PoolManager.GetResourceInFreePool(EResourceType.Item, 1).transform.position = point;
}
// <20>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>״̬
GameManager.Instance.PlotManager.PlotDictionary[15] = 2;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
GameManager.Instance.PlayerManager.Enable = true;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>
GameManager.Instance.SoundManager.LockEnable = false;
// <20><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD>
GameManager.Instance.SoundManager.PlaySound(ESoundType.Music, "LevelWin");
});
};
}
}