Ejemplo n.º 1
0
 public GazeEnterState(Terminus _sub1, Terminus _sub2)
 {
     name        = "GazeEnterState";
     description = "Gaze enter between subject1 and subject2";
     subject1    = _sub1;
     subject2    = _sub2;
 }
Ejemplo n.º 2
0
 protected void Start()
 {
     //Load a text file (Assets/Resources/Text/textFile01.txt)
     normalHand = Resources.Load <Texture2D>("Tasc/Texture/handfinger");
     grabHand   = Resources.Load <Texture2D>("Tasc/Texture/handgrab");
     terminus   = GetComponent <Terminus>();
 }
Ejemplo n.º 3
0
 public MoveState(Terminus _sub, string _variableName = "moveState") : base(_sub, _variableName, Vector3.zero)
 {
     id          = 110;
     name        = "MoveState";
     description = "Moving event of a subject";
     value       = new Parameter <Vector3>(_sub.transform.position);
 }
Ejemplo n.º 4
0
 public InputHoldState(Terminus _sub, int _key)
 {
     name        = "InputHoldState";
     description = "Input hold of a subject";
     subject     = _sub;
     value       = new Parameter <int>(_key);
 }
Ejemplo n.º 5
0
 public CollisionEnterState(Terminus _sub1, Terminus _sub2)
 {
     name        = "CollisionEnterState";
     description = "Collision enter between subject1 and subject2";
     subject1    = _sub1;
     subject2    = _sub2;
 }
Ejemplo n.º 6
0
 public IntVariableState(Terminus _sub, string _variableName, int _value) : base(_sub, _variableName)
 {
     id          = 122;
     name        = "IntVariableState";
     description = "Check an int variable of a subject";
     value       = new Parameter <int>(_value);
 }
Ejemplo n.º 7
0
 public HoverExitState(Terminus _sub1, Terminus _sub2)
 {
     name        = "HoverExitState";
     description = "Hover exit between subject1 and subject2";
     subject1    = _sub1;
     subject2    = _sub2;
 }
Ejemplo n.º 8
0
 public ControllerMovingState(Terminus _sub, int _key)
 {
     name        = "ControllerMovingState";
     description = "Moving state of controller(s).";
     subject     = _sub;
     value       = new Parameter <int>(_key);
 }
 public VectorVariableState(Terminus _sub, string _variableName, Vector3 _value) : base(_sub, _variableName)
 {
     id          = 124;
     name        = "VectorVariableState";
     description = "Check an Vector3 variable of a subject";
     value       = new Parameter <Vector3>(_value);
 }
 public VariableState(Terminus _sub, string _variableName)
 {
     name         = "VariableState";
     description  = "Check a variable of a subject";
     subject      = _sub;
     variableName = new Parameter <string>(_variableName);
 }
Ejemplo n.º 11
0
 public OTouchDownState(Terminus _sub, int _key)
 {
     name        = "OTouchDownState";
     description = "Oculus Touch button down of a subject";
     subject     = _sub;
     value       = new Parameter <int>(_key);
 }
Ejemplo n.º 12
0
 public BoolVariableState(Terminus _sub, string _variableName, bool _value) : base(_sub, _variableName)
 {
     id          = 121;
     name        = "BoolVariableState";
     description = "Check a bool variable of a subject";
     value       = new Parameter <bool>(_value);
 }
Ejemplo n.º 13
0
 public GazeExitState(Terminus _sub1, Terminus _sub2)
 {
     id          = 106;
     name        = "GazeExitState";
     description = "Gaze exit between subject1 and subject2";
     subject1    = _sub1;
     subject2    = _sub2;
 }
Ejemplo n.º 14
0
 public InputUpState(Terminus _sub, int _key)
 {
     id          = 109;
     name        = "InputUpState";
     description = "Input up of a subject";
     subject     = _sub;
     value       = new Parameter <int>(_key);
 }
Ejemplo n.º 15
0
 public HoverEnterState(Terminus _sub1, Terminus _sub2)
 {
     id          = 111;
     name        = "HoverEnterState";
     description = "Hover enter between subject1 and subject2";
     subject1    = _sub1;
     subject2    = _sub2;
 }
 public CollisionExitState(Terminus _sub1, Terminus _sub2)
 {
     id          = 103;
     name        = "CollisionExitState";
     description = "Collision exit between subject1 and subject2";
     subject1    = _sub1;
     subject2    = _sub2;
 }
Ejemplo n.º 17
0
        public static string ToJSON(Terminus obj)
        {
            string   result   = "\"" + obj.name + "\":{";
            Collider collider = obj.terminusChecker;

            result += "\"terminus\":{";
            //result += "{\"rotation\":" + Vec3ToJSON(transform.rotation.eulerAngles);
            //result += "{\"localRotation\":" + Vec3ToJSON(transform.localRotation.eulerAngles);
            //result += ",\"position\":" + Vec3ToJSON(transform.position);
            //result += ",\"scale\":" + Vec3ToJSON(transform.localScale);
            if (collider != null)
            {
                result += "\"center\":" + Vec3ToJSON(collider.bounds.center);
                result += ",\"size\":" + Vec3ToJSON(collider.bounds.size);
                result += ",\"min\":" + Vec3ToJSON(collider.bounds.min);
                result += ",\"max\":" + Vec3ToJSON(collider.bounds.max);
            }

            return(result + "}}");
        }
Ejemplo n.º 18
0
 public FloatVariableState(Terminus _sub, string _variableName, float _value) : base(_sub, _variableName)
 {
     name        = "FloatVariableState";
     description = "Check an float variable of a subject";
     value       = new Parameter <float>(_value);
 }
 public AutoVariableState(Terminus _sub, string _variableName, int _value)
 {
     variableState = new IntVariableState(_sub, _variableName, _value);
 }
 public AutoVariableState(Terminus _sub, string _variableName, bool _value)
 {
     variableState = new BoolVariableState(_sub, _variableName, _value);
 }
 public AutoVariableState(Terminus _sub, string _variableName, Vector3 _value)
 {
     variableState = new VectorVariableState(_sub, _variableName, _value);
 }
 public AutoVariableState(Terminus _sub, string _variableName, float _value)
 {
     variableState = new FloatVariableState(_sub, _variableName, _value);
 }