コード例 #1
0
        // Use this for initialization
        void Start()
        {
            _update_action = new UnityAction[] {
                update__grab_to_plane,
                update__wait_release_grab,
                update__wind_rotate,
                update__play_gravity,
                update__wait_relax
            };

            _anim = GetComponent <Animator>();

            _wing_mesh = freestyle_point.Find("Plane").gameObject;
            _wing_bone = freestyle_point.Find("wing").gameObject;

            _pause         = FindObjectOfType <als_game_manage>();
            _tutorial_menu = FindObjectOfType <als_tutorial_menu>();

            _max_help = (PlayerPrefs.GetInt("control_layout", 0) == 1 ? 7 : 5);


            _camera = FindObjectOfType <als_camera_movement>();
            _camera.lookat_disable();

            _gravity = Physics2D.gravity;

            gymnast.disable_control(float.MaxValue);

            //_anim.Play("level00_camera_start2");
        }
コード例 #2
0
        // initialization
        void Awake()
        {
            _anims.Add("ungrab");
            if (PlayerPrefs.GetInt("control_layout", 0) == 1)
            {
                _anims.Add("direct_arm");
                _anims.Add("direct_leg");
                _anims.Add("group_arm");
                _anims.Add("group_leg");
                _anims.Add("roll");
                _anims.Add("relax");
                _anims.Add("how2roll");
                _anims.Add("how2jump");
                _anims.Add("how2fly");
                _anims.Add("how2grab");
                _anims.Add("how2swing");
            }
            else
            {
                _anims.Add("direct_all");
                _anims.Add("jump");
                _anims.Add("roll2");
                _anims.Add("relax");
                _anims.Add("relax");                //reserve copy for next index
                _anims.Add("relax");                //reserve copy for next index
                _anims.Add("how2roll2");
                _anims.Add("how2jump2");
                _anims.Add("how2fly");
                _anims.Add("how2grab");
                _anims.Add("how2swing2");
            }


            _xml.load_text_asset("_tutorial");

            // мультиязычный текст и файла
            txt_continue.text = _xml.get_single_node("root/help/continue");
            _pause            = FindObjectOfType <als_game_manage>();

            _visibility = transform.GetChild(0).gameObject;
            _anim       = _visibility.GetComponent <Animator>();
        }