Esempio n. 1
0
        /**
         * func: sets up first dialogue message and responses
         */
        public void StartConversation(InteractionComponent questioner, InteractionComponent responder, Conversation con)
        {
            if (con == null || questioner == null || responder == null)
                throw new NullReferenceException("Cannot start interaction: con, questioner or responder reference not set!");
            currentConversation = con;
            this.questioner = questioner;
            this.responder = responder;
            Constants.ActivateUI(EUIMode.INTERACTION_UI);

            updateUI();
        }
Esempio n. 2
0
 protected virtual void Awake()
 {
     moveComp = GetComponent<EntityMovement>();
     _praeObject = GetComponent<EntityObject>();
     _entityInfo = new EntityInfo();
     _interComp = GetComponent<InteractionComponent>();
     abiCon = new AbilityManager(this);
     DEB_testManager = new TestManager(this);
     praeObject.meleeRange = 10f;    // ?
 }
Esempio n. 3
0
 /**
  * func: add i to the pool of temporary interactors. if DateTime.Now > endTime, i will be destroyed
  * @i:       component to be destroyed when DateTime.Now > endTime
  * @endTime: terminal condition
  */
 public void AddTimedInteraction(InteractionComponent i, DateTime endTime)
 {
     Debug.Assert(endTime > DateTime.Now, "Do not add a timed interaction with endTime < startTime!");
     timedInteractions.Add(new timedInteraction(i, endTime));
 }
Esempio n. 4
0
 public timedInteraction(InteractionComponent i, DateTime endTime)
 {
     comp = i;
     this.endTime = endTime;
 }
Esempio n. 5
0
 void Awake()
 {
     if (_weight < 0 || _meleeRange < 0)
         throw new ArgumentException("Floats with illegal, negative values found!");
     _description = descriptions[0];
     interComp = GetComponent<InteractionComponent>(); // can be present, but doesn't have to
 }
Esempio n. 6
0
        public InteractionComponent AddInteractionComponent()
        {
            if (interComp)
                throw new ArgumentException("Object already has interaction component!");

            interComp = gameObject.AddComponent<InteractionComponent>();
            return interComp;
        }
 public void StartInteraction(InteractionComponent target)
 {
     TextAsset conAsset = Resources.Load<TextAsset>("Conversations/test_g1"); // TESTING:
     Conversation[] con = Conversation.loadFromGephiGraphML(conAsset);
     Debug.Assert(target != null);
     Constants.interactionManager.StartConversation(this, target, con[0]);
 }