88 lines
1.9 KiB
C#
88 lines
1.9 KiB
C#
using LTGame;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Framework;
|
|
using TGS;
|
|
using UnityEngine;
|
|
|
|
namespace Gameplay.Camp.Fsm
|
|
{
|
|
/// <summary>
|
|
/// 营地编辑状态
|
|
/// </summary>
|
|
public class EditCampState : BaseCampState, IMobileInputEventHandler
|
|
{
|
|
private InputProcessor inputProcessor;
|
|
public EditCampState(Camp camp) : base((int)E_CampState.Edit, camp)
|
|
{
|
|
}
|
|
|
|
public override void Enter(NBaseState exitState, object param)
|
|
{
|
|
base.Enter(exitState, param);
|
|
|
|
camp.SetInfoByEdit();
|
|
|
|
if (inputProcessor == null)
|
|
{
|
|
inputProcessor = InputProcessor.Create(InputInterpreterType.AutoPlatform_ExcludeUI, this);
|
|
}
|
|
}
|
|
|
|
protected override void _OnRunning()
|
|
{
|
|
base._OnRunning();
|
|
|
|
camp.UpdateEdit();
|
|
}
|
|
|
|
public override void Exit(NBaseState enterState, object param)
|
|
{
|
|
if (inputProcessor != null)
|
|
{
|
|
inputProcessor.Destroy(true);
|
|
inputProcessor = null;
|
|
}
|
|
|
|
camp.ExitEdit();
|
|
|
|
base.Exit(enterState, param);
|
|
}
|
|
|
|
|
|
public void OnPointerDown(Vector2 screenPosition)
|
|
{
|
|
|
|
}
|
|
|
|
public void OnPointerUp(Vector2 screenPosition)
|
|
{
|
|
|
|
}
|
|
|
|
public void OnPressMove(Vector2 delta)
|
|
{
|
|
|
|
}
|
|
|
|
public void OnTap(Vector2 screenPosition)
|
|
{
|
|
camp.OnEditClick(screenPosition);
|
|
}
|
|
|
|
public void OnLongPress(Vector2 screenPosition)
|
|
{
|
|
|
|
}
|
|
|
|
public void OnLongPressUp(Vector2 screenPosition)
|
|
{
|
|
camp.OnEditClick(screenPosition);
|
|
}
|
|
|
|
public void OnZoom(float delta)
|
|
{
|
|
|
|
}
|
|
}
|
|
} |