コード例 #1
0
    // loading resources for the first scence
    public void LoadResources()
    {
        scene      = Object.Instantiate(Resources.Load("River", typeof(GameObject)), new Vector3(-2.503f, -8.267982f, 2.844666f), Quaternion.identity) as GameObject;
        characters = new Character[6];
        leftside   = new RiverSide(true);
        rightside  = new RiverSide(false);
        Vector3 dst;

        for (int i = 0; i < 3; i++)
        {
            Character character = new Character(true, i);
            characters[i] = character;
            dst           = leftside.JoinLand(character);
            character.obj.transform.position = dst;
        }
        for (int i = 3; i < 6; i++)
        {
            Character character = new Character(false, i);
            characters[i] = character;
            dst           = leftside.JoinLand(character);
            character.obj.transform.position = dst;
        }
        boat = new Boat();
    }