Пример #1
0
        // Use this before you continue with the interaction order
        public bool IsInteractionAllowed(ActionType withThisAction, InteractingComponent interactWith)
        {
            bool checkInteraction = true;

            switch (withThisAction)
            {
            case ActionType.Inspect:
            case ActionType.Gather:
            case ActionType.Converse:
                // Check if Near
                float dist = Vector3.Distance(this.transform.position, interactWith.transform.position);
                Debug.Log("Distance : " + dist);
                if (dist > allowableInteractDistance)
                {
                    checkInteraction = false;
                }
                else
                {
                    checkInteraction = true;
                }
                break;

            case ActionType.Wait:

                break;

            case ActionType.Observe:

                break;
            }

            return(checkInteraction);
        }
Пример #2
0
 public virtual void StartInteraction(InteractingComponent unit, ActionType actionIndex)
 {
     // Unique
 }