// 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();
    }
Esempio n. 2
0
 //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);
 }
Esempio n. 3
0
        public MouseProvider(IInputClient client)
        {
            if (client == null)
                throw new ArgumentNullException("client");

            Client = client;
            Enabled = true;

            provider = new MousePositionProvider("left", this);
            providers = new IPositionProvider[] { provider };
        }
Esempio n. 4
0
 public ConsoleClient(IOutputClient OutputClient, IInputClient InputClient)
 {
     _OutputClient = OutputClient; _InputClient = InputClient;
 }