// Use this for initialization // Use this for initialization void Start() { wapon1 = GetComponentInChildren <IInputClient>(); GetComponent <InputClientManager>().ResetClient(wapon1); processor = GetComponent <LEUnitProcessorBase>(); animationPro = GetComponent <LEUnitAnimatorManager>(); animationPro.SetMotionTypeImmediately(LEUnitAnimatorManager.AnimationMotionType.IWR_0); angent = GetComponent <NavMeshAgent>(); partrolState = new AiPatrolState(this); searchState = new AISearchState(this); chaseState = new AiChaseState(this); fightState = new AiFightState(this); partrolState.Init(); searchState.Init(); chaseState.Init(); fightState.Init(); currentState = partrolState; currentState.OnStateEnter(); }
//Reset InputAction Client and Init the Client. public void ResetClient(IInputClient client) { if (inputClient != null) { inputClient.ShutDown(); } inputClient = client; inputClient.Init(this); inputClient.SetUpLayer(gameObject.layer + 1); }
public MouseProvider(IInputClient client) { if (client == null) throw new ArgumentNullException("client"); Client = client; Enabled = true; provider = new MousePositionProvider("left", this); providers = new IPositionProvider[] { provider }; }
public ConsoleClient(IOutputClient OutputClient, IInputClient InputClient) { _OutputClient = OutputClient; _InputClient = InputClient; }