Пример #1
0
        private void Awake()
        {
            if (damageable == null)
            {
                damageable = GetComponent <Damageable>();
            }

            if (pusher == null)
            {
                pusher = GetComponent <Pusher>();
            }
        }
Пример #2
0
        private void Awake()
        {
            if (component == null)
            {
                component = GetComponent <ObstacleComponent>();
                Debug.Log("Forgot to reference", this);
            }

            if (damager == null)
            {
                damager = GetComponent <Damager>();
                Debug.Log("Forgot to reference", this);
            }

            if (pusher == null)
            {
                pusher = GetComponent <Pusher>();
                Debug.Log("Forgot to reference", this);
            }
        }
Пример #3
0
        private void Awake()
        {
            if (damageable == null)
            {
                damageable = GetComponent <Damageable>();
            }

            if (movable == null)
            {
                movable = GetComponent <Movable>();
            }

            if (obstComp == null)
            {
                obstComp = GetComponent <ObstacleComponent>();
            }

            if (pusher == null)
            {
                pusher = GetComponent <Pusher>();
            }

            obstComp.OnSetup += Setup;
        }