예제 #1
0
    protected override void Awake()
    {
        base.Awake();

        enableTriggers = true;

        player = GameSceneController.GetMainPlayer();



        if (enterHouseDoor != null)
        {
            enterHouseDoor.onTriggerEnterEvent += OnEnterHouseDoorTriggerEnter;
            enterHouseDoor.onTriggerStayEvent  += OnEnterHouseDoorTriggerStay;
            enterHouseDoor.onTriggerExitEvent  += OnEnterHouseDoorTriggerExit;
        }

        if (exitLeft != null)
        {
            exitLeft.onTriggerEnterEvent += OnEnterExitLeftTriggerEnter;
            exitLeft.onTriggerStayEvent  += OnEnterExitLeftTriggerStay;
            exitLeft.onTriggerExitEvent  += OnEnterExitLeftTriggerExit;
        }

        if (exitRigth != null)
        {
            exitRigth.onTriggerEnterEvent += OnEnterExitRightTriggerEnter;
            exitRigth.onTriggerStayEvent  += OnEnterExitRightTriggerStay;
            exitRigth.onTriggerExitEvent  += OnEnterExitRightTriggerExit;
        }
    }
예제 #2
0
    protected override void Awake()
    {
        base.Awake();

        player = GameSceneController.GetMainPlayer();

        if (exitDoor != null)
        {
            exitDoor.onTriggerEnterEvent += OnExitDoorTriggerEnter;
            exitDoor.onTriggerStayEvent  += OnExitDoorTriggerStay;
            exitDoor.onTriggerExitEvent  += OnExitDoorTriggerExit;
        }
    }