//    public OnTriggerEnterCommand frontStubCommand;

        private void Awake()
        {
            Controller = GetComponent <EnemyController>();
            meleeWeapon.SetMaster(this.gameObject);
            damageable.Register(this);
            //  frontStubCommand.interactorObj = PlayerController.Instance.gameObject.GetComponent<GameCommandReceiver>();
            //  frontStubCommand.IsTriggerOpen(false);

            enemyUI.gameObject.SetActive(true);
            enemyUI.SetName(name);

            MonoLinkedStateMachineBehviour <OspreyCaptianBehaviour> .Initialise(Controller.Animator, this);
        }
Exemple #2
0
        private void Awake()
        {
            playerInput = GetComponent <PlayerInput>();
            animator    = GetComponent <Animator>();
            //     characterController = GetComponent<CharacterController>();

            rigibody = GetComponent <Rigidbody>();

            damageable.Register(this);
            weapon.SetMaster(this.gameObject);

            MonoLinkedStateMachineBehviour <PlayerController> .Initialise(animator, this);
        }
Exemple #3
0
        private void Start()
        {
            animator = GetComponent <Animator>();
            if (animator == null)
            {
                throw new Exception("You Need Animator");
            }

            MonoLinkedStateMachineBehviour <EffectEvent> .Initialise(animator, this);

            eventDir.Clear();
            for (int i = 0; i < eventDate.Length; ++i)
            {
                eventDir[eventDate[i].name] = eventDate[i];

                for (int j = 0; j < eventDate[i].effect.Length; ++j)
                {
                    GameObject obj = ObjectPool.Instance.Get(eventDate[i].effect[j].prefab);
                    ObjectPool.Instance.Return(obj);
                }
            }
        }