Ejemplo n.º 1
0
        public override void Initialize()
        {
            base.Initialize();

            m_Controls = FindObjectOfType <WalkerControls>();

            if (m_Controls != null)
            {
                m_Controls.WalkUpdateEvent += OnWalkUpdate;
                m_Controls.LookUpdateEvent += OnLookUpdate;

                OnWalkUpdate();
                OnLookUpdate();
            }
        }
Ejemplo n.º 2
0
        private void Awake()
        {
            m_Rigidbody = GetComponentInChildren <Rigidbody>();
            m_DefRot    = m_Rigidbody.rotation;
            m_DefPos    = m_Rigidbody.position;

            m_Controls = FindObjectOfType <WalkerControls>();

            if (m_Controls != null)
            {
                m_Controls.WalkUpdateEvent += OnWalkUpdate;
                m_Controls.LookUpdateEvent += OnLookUpdate;

                OnWalkUpdate();
                OnLookUpdate();
            }
        }