예제 #1
0
    }                                                                      //动作分离版本新增

    public BoatModel()
    {
        boat      = Object.Instantiate(Resources.Load("Boat", typeof(GameObject)), new Vector3(7, -4, 0), Quaternion.identity) as GameObject;
        boat.name = "boat";
        click     = boat.AddComponent(typeof(Click)) as Click;
        click.SetBoat(this);
        start_empty_pos = new Vector3[] { new Vector3(6, -2, 0), new Vector3(8, -2, 0) };
        end_empty_pos   = new Vector3[] { new Vector3(-8, -2, 0), new Vector3(-6, -2, 0) };
    }
예제 #2
0
파일: Model.cs 프로젝트: Jan-Jsr/3D-
    }                                                                      //动作分离版本新增

    public BoatModel()
    {
        boat      = Object.Instantiate(Resources.Load("Boat", typeof(GameObject)), new Vector3(30, -3.9F, -2.9F), Quaternion.identity) as GameObject;
        boat.name = "boat";
        click     = boat.AddComponent(typeof(Click)) as Click;
        click.SetBoat(this);
        start_empty_pos = new Vector3[] { new Vector3(20, 2, -4), new Vector3(40, 2, -4) };
        end_empty_pos   = new Vector3[] { new Vector3(-40, 2, -4), new Vector3(-20, 2, -4) };
    }
        public BoatModel()
        {
            boat = Object.Instantiate(Resources.Load("Prefabs/Boat", typeof(GameObject)), new Vector3(25, -2.5F, 0), Quaternion.identity) as GameObject;

            boat.name = "boat";
            click     = boat.AddComponent(typeof(Click)) as Click;
            click.SetBoat(this);
            start_empty_pos = new Vector3[] { new Vector3(18, 4, 0), new Vector3(32, 4, 0) };
            end_empty_pos   = new Vector3[] { new Vector3(-32, 4, 0), new Vector3(-18, 3, 0) };
        }
예제 #4
0
        public BoatModel()
        {
            boat = Object.Instantiate(Resources.Load("Prefabs/Boat", typeof(GameObject)), new Vector3(10, 3.5F, 0), Quaternion.identity) as GameObject;

            boat.name = "boat";
            move      = boat.AddComponent(typeof(Move)) as Move;
            click     = boat.AddComponent(typeof(Click)) as Click;
            click.SetBoat(this);
            start_empty_pos = new Vector3[] { new Vector3(12, 5.5F, 0), new Vector3(8, 5.5F, 0) };
            end_empty_pos   = new Vector3[] { new Vector3(-8, 5.5F, 0), new Vector3(-12, 5.5F, 0) };
        }
예제 #5
0
 public BoatModel()
 {
     boat = Object.Instantiate(
         Resources.Load <GameObject>("Prefabs/Boat"),
         new Vector3(5, 0.5f, 0), Quaternion.identity) as GameObject;
     boat.name = "boat";
     click     = boat.AddComponent(typeof(Click)) as Click;
     click.SetBoat(this);
     startPos = new Vector3[] { new Vector3(5.5f, 1, 0), new Vector3(4.5f, 1, 0) };
     endPos   = new Vector3[] { new Vector3(-4.5f, 1, 0), new Vector3(-5.5f, 1, 0) };
 }
    public BoatModel()
    {
        boat      = Object.Instantiate(Resources.Load("Boat", typeof(GameObject)), boat_position, Quaternion.identity) as GameObject;
        boat.name = "boat";

        //move = boat.AddComponent(typeof(Move)) as Move;

        click = boat.AddComponent(typeof(Click)) as Click;
        click.SetBoat(this);

        Vector3 end_pos2 = boat_seat1;

        end_pos2.x = -1 * boat_seat1.x;
        Vector3 end_pos1 = boat_seat2;

        end_pos1.x      = -1 * boat_seat2.x;
        start_empty_pos = new Vector3[] { boat_seat1, boat_seat2 };
        end_empty_pos   = new Vector3[] { end_pos1, end_pos2 };
    }