예제 #1
0
    void Start()
    {
        body = projectileObject.gameObject.GetComponent <Rigidbody>();

        DemoSceneUI.SetSceneTitle("swipe demo, use swipe to throw the ball object in the scene");
        DemoSceneUI.SetSceneInstruction("swipe on screen with 1 finger.\nyou can use mouse to simulate that");
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        //initiate the turret position on screen
        turretPos = Camera.main.WorldToScreenPoint(turret.position);

        //fake a tap event to initiate the turret rotation and cursor
        Tap tap = new Tap(new Vector2(Screen.width / 2, Screen.height / 2));

        OnTap(tap);

        DemoSceneUI.SetSceneTitle("Shoot the target!!");
        DemoSceneUI.SetSceneInstruction("- tap on on screen to set the aim\n- hold down 2 fingers on screen to charge up a fire\n- right click to simulate 2 fingers charge");
    }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        dist = transform.localPosition.z;

        DemoSceneUI.SetSceneTitle("RTS camera, the camera will orbit around a pivot point but the rotation in z-axis is locked");

        string instInfo = "";

        instInfo += "- swipe or drag on screen to rotate the camera\n";
        instInfo += "- pinch or using mouse wheel to zoom in/out\n";
        instInfo += "- swipe or drag on screen with 2 fingers to move around\n";
        instInfo += "- single finger interaction can be simulate using left mosue button\n";
        instInfo += "- two fingers interacion can be simulate using right mouse button";
        DemoSceneUI.SetSceneInstruction(instInfo);
    }
예제 #4
0
    // Use this for initialization
    void Start()
    {
        dist = transform.position.z;

        DragInfo dInfo = new DragInfo(Vector2.zero, new Vector2(1000, 1000), 1);

        OnDragging(dInfo);

        orbitSpeed = Vector2.zero;


        DemoSceneUI.SetSceneTitle("Free orbit camera, the camera will orbit around the object");

        string instInfo = "";

        instInfo += "- swipe or drag on screen to rotate the camera in x and y-axis\n";
        instInfo += "- pinch or using mouse wheel to zoom in/out\n";
        instInfo += "- rotate two fingers on screen to rotate the camera in z-axis\n";
        instInfo += "- single finger interaction can be simulate using left mosue button\n";
        DemoSceneUI.SetSceneInstruction(instInfo);
    }
예제 #5
0
    //public float panSpeedModifier=1f;

    // Use this for initialization
    void Start()
    {
        dist = transform.localPosition.z;

        //create a dummy transform as the parent of the target
        //we will rotate this parent along y-axis, so the target will only rotate along local x-axis
        GameObject obj = new GameObject();

        obj.transform.position = targetT.position;
        targetT.parent         = obj.transform;
        targetP = obj.transform;


        DemoSceneUI.SetSceneTitle("Alternate RTS camera, the object in focus moves instead of the camera");

        string instInfo = "";

        instInfo += "- swipe or drag on screen to rotate the camera\n";
        instInfo += "- pinch or using mouse wheel to zoom in/out\n";
        instInfo += "- swipe or drag on screen with 2 fingers to move around\n";
        instInfo += "- single finger interaction can be simulate using left mosue button\n";
        instInfo += "- two fingers interacion can be simulate using right mouse button";
        DemoSceneUI.SetSceneInstruction(instInfo);
    }
예제 #6
0
 // Use this for initialization
 void Start()
 {
     DemoSceneUI.SetSceneTitle("");
     DemoSceneUI.SetSceneInstruction("interact with each object using the interaction stated on top of each of them");
 }
예제 #7
0
 void Start()
 {
     DemoSceneUI.SetSceneTitle("Shoot the target!!");
     DemoSceneUI.SetSceneInstruction("- press on the fire button and flick it towards a target\n- the flick direction and speed will determine the firing angle and force");
 }