Exemple #1
0
        void Start()
        {
            _collider           = gameObject.AddComponent <BoxCollider>();
            _collider.isTrigger = true;

            receiver = gameObject.AddComponent <InteractReceiver>();
            receiver.SetInteractRange(2);
            receiver.SetPromptText((UITextType)UI.AddToUITable.Add("bazinga"));
            receiver.OnPressInteract   += OnPress;
            receiver.OnReleaseInteract += OnRelease;
        }
Exemple #2
0
        internal void Start()
        {
            _collider           = gameObject.AddComponent <BoxCollider>();
            _collider.isTrigger = true;

            receiver = gameObject.AddComponent <InteractReceiver>();
            receiver.SetInteractRange(2);
            receiver.SetValue("_usableInShip", true);
            receiver.SetPromptText(text);
            receiver.OnPressInteract   += OnPress;
            receiver.OnReleaseInteract += OnRelease;
        }