Exemplo n.º 1
0
        public Node <INode> GetNode(string nodeName)
        {
            switch (nodeName)
            {
            case AddForce.NAME:
                INode nodeAddForce = new AddForce() as INode;
                return(new Node <INode> (nodeAddForce));

            case AddTorque.NAME:
                INode nodeAddTorque = new AddTorque() as INode;
                return(new Node <INode> (nodeAddTorque));

            case RigidBody.NAME:
                INode nodeRigidBody = new RigidBody() as INode;
                return(new Node <INode> (nodeRigidBody));

            case Velocity.NAME:
                INode nodeVelocity = new Velocity() as INode;
                return(new Node <INode> (nodeVelocity));

            case CollisionEnter.NAME:
                INode nodeCollisionEnter = new CollisionEnter() as INode;
                return(new Node <INode> (nodeCollisionEnter));

            case CollisionStay.NAME:
                INode nodeCollisionStay = new CollisionStay() as INode;
                return(new Node <INode> (nodeCollisionStay));

            case CollisionExit.NAME:
                INode nodeCollisionExit = new CollisionExit() as INode;
                return(new Node <INode> (nodeCollisionExit));

            case FixedUpdate.NAME:
                INode nodeFixedUpdate = new FixedUpdate() as INode;
                return(new Node <INode> (nodeFixedUpdate));

            case AddImpulseForce.NAME:
                INode nodeImpulse = new AddImpulseForce() as INode;
                return(new Node <INode> (nodeImpulse));

            case Character.NAME:
                var nodeCharacter = new Character() as INode;
                return(new Node <INode> (nodeCharacter));

            case CharacterForward.NAME:
                var nodeCharacterForward = new CharacterForward() as INode;
                return(new Node <INode> (nodeCharacterForward));

            case CameraRaycast.NAME:
                var nodeCameraRayCast = new CameraRaycast() as INode;
                return(new Node <INode> (nodeCameraRayCast));

            case AddImpulseTorque.NAME:
                var nodeAddImpulseTorque = new AddImpulseTorque() as INode;
                return(new Node <INode>(nodeAddImpulseTorque));

            default:
                return(null);
            }
        }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        cameraRaycast = GetComponent <CameraRaycast>();

        cameraRaycast.layerChange += OnLayerChange;

        Cursor.SetCursor(m_WalkableTex, m_HotSpot, CursorMode.Auto);
    }
Exemplo n.º 3
0
    void Start()
    {
        m_Character        = GetComponent <ThirdPersonCharacter> ();
        camRay             = Camera.main.GetComponent <CameraRaycast> ();
        currentClickTarget = transform.position;

        m_Cam = Camera.main.transform;
    }
Exemplo n.º 4
0
    void Start()
    {
        cameraRaycast    = FindObjectOfType <CameraRaycast>();
        animatorStempels = GetComponent <Animator>();

        stempelRoodHand.SetActive(false);
        stempelGroenHand.SetActive(false);

        InstantiatePaper();
    }
Exemplo n.º 5
0
 public void Deselect(CameraRaycast camera)
 {
     raycastHit = false;
 }
Exemplo n.º 6
0
 public void Select(CameraRaycast camera)
 {
     raycastHit = true;
 }
Exemplo n.º 7
0
 void Start()
 {
     camRay = GetComponent <CameraRaycast> ();
     player = GameObject.FindGameObjectWithTag("Player");
     camRay.LayerChangeEvent += OnLayerChange;
 }
Exemplo n.º 8
0
        // Registers the camera raycast so that the cell that is being operated on (using the mouse) can be seen here
        private void registerCameraRaycast()
        {
            CameraRaycast cameraRaycast = Camera.main.GetComponent <CameraRaycast>();

            cameraRaycast.mouseOverCellObservers += updatehighlightedCell;
        }
Exemplo n.º 9
0
 void Start()
 {
     cameraRaycast = FindObjectOfType <CameraRaycast>();
     stampControl  = FindObjectOfType <StampControl>();
     audioSource   = GetComponent <AudioSource>();
 }