Exemplo n.º 1
0
 protected override void Awake()
 {
     base.Awake();
     if (rewardable == null)
     {
         rewardable = GetComponent <Rewardable>();
     }
 }
Exemplo n.º 2
0
        private void Awake()
        {
            if (component == null)
            {
                component = GetComponent <ObstacleComponent>();
                Debug.Log("Forgot to reference", this);
            }

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

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

            component.OnSetup += Setup;
        }