Esempio n. 1
0
    // ================================================================ //

    protected void disconnect_event()
    {
        if (GlobalParam.get().is_in_my_home == false &&
            GlobalParam.get().is_remote_in_my_home == false)
        {
            chrBehaviorPlayer player = this.net_player.behavior as chrBehaviorPlayer;

            if (player != null)
            {
                if (!player.isNowHouseMoving())
                {
                    HouseMoveStartEvent start_event = EventRoot.get().startEvent <HouseMoveStartEvent>();

                    start_event.setPrincipal(player);
                    start_event.setHouse(CharacterRoot.get().findCharacter <chrBehaviorNPC_House>("House1"));
                }
            }
        }
        else if (GlobalParam.get().is_in_my_home&&
                 GlobalParam.get().is_remote_in_my_home)
        {
            this.step.set_next(STEP.BYEBYE);
        }
    }
Esempio n. 2
0
    // ================================================================ //

    protected void          create_debug_window()
    {
        var window = dbwin.root().createWindow("game");

        window.createButton("캐릭터를 변경합니다")
        .setOnPress(() =>
        {
            this.step.set_next(STEP.CHARACTER_CHANGE);
        });

        if (GlobalParam.get().is_in_my_home)
        {
            window.createButton("놀러갑니다!")
            .setOnPress(() =>
            {
                LeaveEvent leave_event = EventRoot.get().startEvent <LeaveEvent>();

                leave_event.setPrincipal(this.local_player.behavior as chrBehaviorPlayer);
                leave_event.setIsLocalPlayer(true);
            });
        }
        else
        {
            window.createButton("집으로 돌아갑니다~")
            .setOnPress(() =>
            {
                LeaveEvent leave_event = EventRoot.get().startEvent <LeaveEvent>();

                leave_event.setPrincipal(this.local_player.behavior as chrBehaviorPlayer);
                leave_event.setIsLocalPlayer(true);
            });
        }

        window.createButton("누군가 왔다!")
        .setOnPress(() =>
        {
            this.step.set_next(STEP.WELCOME);
        });

        window.createButton("바이바~이")
        .setOnPress(() =>
        {
            this.step.set_next(STEP.BYEBYE);
        });

        window.createButton("출발 이벤트 테스트")
        .setOnPress(() =>
        {
            LeaveEvent leave_event = EventRoot.get().startEvent <LeaveEvent>();

            leave_event.setPrincipal(this.local_player.behavior as chrBehaviorPlayer);
            leave_event.setIsLocalPlayer(true);
            leave_event.setIsMapChange(false);

            window.close();
        });

        window.createButton("도착 이벤트 테스트")
        .setOnPress(() =>
        {
            EnterEvent enter_event = EventRoot.get().startEvent <EnterEvent>();

            enter_event.setPrincipal(this.local_player.behavior as chrBehaviorPlayer);

            window.close();
        });

        window.createButton("이사 시작 이벤트 테스트")
        .setOnPress(() =>
        {
            HouseMoveStartEvent start_event = EventRoot.get().startEvent <HouseMoveStartEvent>();

            start_event.setPrincipal(this.local_player.behavior as chrBehaviorPlayer);
            start_event.setHouse(CharacterRoot.get().findCharacter <chrBehaviorNPC_House>("House1"));

            window.close();
        });
        window.createButton("이사 종료 이벤트 테스트")
        .setOnPress(() =>
        {
            HouseMoveEndEvent end_event = EventRoot.get().startEvent <HouseMoveEndEvent>();

            end_event.setPrincipal(this.local_player.behavior as chrBehaviorPlayer);
            end_event.setHouse(CharacterRoot.get().findCharacter <chrBehaviorNPC_House>("House1"));

            window.close();
        });
    }