62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using LTGame;
|
|
using TGS;
|
|
using UnityEngine;
|
|
|
|
namespace Gameplay.LegionBattle
|
|
{
|
|
public abstract class BaseLegionBattleState : NBaseState
|
|
{
|
|
protected LegionBattle legionBattle;
|
|
|
|
public BaseLegionBattleState(LegionBattle legionBattle, E_LegionBattleState state) : base((int)state)
|
|
{
|
|
this.legionBattle = legionBattle;
|
|
}
|
|
|
|
protected override void _OnEnter(NBaseState exitState, object param)
|
|
{
|
|
}
|
|
|
|
protected override void _OnRunning()
|
|
{
|
|
|
|
}
|
|
|
|
protected override void _OnExit(NBaseState exitState, object param)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击屏幕
|
|
/// </summary>
|
|
public void ClickFromScreen(Vector3 screenPosition)
|
|
{
|
|
OnClick(screenPosition);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 检查能否点击地板
|
|
/// </summary>
|
|
protected void CheckCellClick(TerrainGridSystem tgs, int cellIndex, int buttonIndex)
|
|
{
|
|
DebugUtil.LogG($"用户点击格子:{cellIndex}");
|
|
OnCellClick(tgs, cellIndex, buttonIndex);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击地板格子
|
|
/// </summary>
|
|
/// <param name="tgs"></param>
|
|
/// <param name="cellIndex"></param>
|
|
/// <param name="buttonIndex"></param>
|
|
protected abstract void OnCellClick(TerrainGridSystem tgs, int cellIndex, int buttonIndex);
|
|
|
|
/// <summary>
|
|
/// 点击屏幕
|
|
/// </summary>
|
|
/// <param name="screenPosition"></param>
|
|
protected abstract void OnClick(Vector2 screenPosition);
|
|
}
|
|
} |