using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; using Sog.Service; using ProtoCSStruct; namespace Game { public interface IMovePathGenerator { void Update(MapActor actor, long nowMs); } public class MovePathGeneratorMgr : Singleton { private IMovePathGenerator[] m_movePathGenerator = new IMovePathGenerator[(int)MapActorMoveType.MAMTMax]; public MovePathGeneratorMgr() { RegisterAll(); } public IMovePathGenerator GetGenerator(int iMoveType) { if (iMoveType > 0 && iMoveType < m_movePathGenerator.Length) { return m_movePathGenerator[iMoveType]; } return null; } private void RegisterAll() { m_movePathGenerator[(int)MapActorMoveType.MAMTRandom] = new RandomPathGenerator(); } } }