示例#1
0
    void IState.OnEnter(WendyAI wendy)
    {
        // - wendy 프로퍼티 초기화
        this._wendy = wendy;
        _state_num  = 1;

        // - 초기화
        //X (애니메이션은 안해도됨)
    }
    void Start()
    {
        particleRing = Ring_Particle.GetComponentInChildren <ParticleSystem>();

        item_layerMask = (1 << LayerMask.NameToLayer("Item")) + (1 << LayerMask.NameToLayer("Doll"));

        //배치퍼즐
        location_layerMask     = (1 << LayerMask.NameToLayer("Display"));
        displayManager_script  = GameObject.FindObjectOfType <DisplayManager_2stage>();
        displayManager_script2 = GameObject.FindObjectOfType <DisplayManager_3stage>();

        displayManager_script2.enabled = false;

        actionController_3stage_script = FindObjectOfType <ActionController_03>();

        //손전등
        FlashlightItem.SetActive(false);
        flash_script         = FlashlightItem.GetComponent <Flashlight_PRO>();
        flash_script.enabled = false;
        flash_end            = FindObjectOfType <OnTrigger_Flash>();

        //모닥불
        Fire_script = GameObject.FindObjectOfType <AddSoundManager>();

        //라이트
        _lightOn_script = GameObject.FindObjectOfType <LightOn_3stage>();

        //외곽선
        OutlineController = GameObject.FindObjectOfType <DrawOutline_HJ>();

        //웬디
        wendyAI_Script = GameObject.FindObjectOfType <WendyAI>();

        //장애물,벽
        obstacleReader_script = GameObject.FindObjectOfType <ObstacleReader>();

        // 쪽지 매니저
        notemager = FindObjectOfType <NoteManger>();

        //지하실
        _cellarManager = GameObject.FindObjectOfType <Cellar_Manager>();

        //지하실 보기
        _cellarDoor_script = GameObject.FindObjectOfType <CellarDoorCollider>();

        //지하실쳐다봐야열리게
        lookingBasement_script = GameObject.FindObjectOfType <LookingBasement>();
    }
示例#3
0
    //private bool _start_coroutine;

    void IState.OnEnter(WendyAI wendy)
    {
        // - wendy 프로퍼티 초기화
        this._wendy = wendy;
        _state_num  = 2;
        //_start_coroutine = false;
        //_contact = _wendy.GetContact();

        // - 초기화
        _wendy.SetIdleAni();

        if (!_contact)
        {
            _wendy.ChangeState();
        }
    }
示例#4
0
    void IState.OnEnter(WendyAI wendy)
    {
        //wendy 프로퍼티 초기화
        this._wendy = wendy;

        _state_num       = WendyState.Idle;
        _contact         = _wendy.GetContact();
        _start_coroutine = false;

        _wendy.SetIdleAni();

        if (!_contact)
        {
            _wendy.StartIdleCoroutine();
            _start_coroutine = true;
        }
    }
示例#5
0
    void IState.OnEnter(WendyAI wendy)
    {
        //wendy 프로퍼티 초기화
        this._wendy = wendy;

        _state_num       = WendyState.Move;
        _contact         = _wendy.GetContact();
        _start_coroutine = false;

        if (_contact)
        {
            _wendy.SetState(new Wendy_IdleState()); //플레이어가 근처에 있으면 움직일 필요 없음
            return;
        }
        else
        {
            _wendy.SetWalkAni();
            _wendy.StartMovemntCoroutine(); //플레이어가 멀리 있으면, 이동할 위치를 지정함
        }
    }
示例#6
0
    void IState.OnEnter(WendyAI wendy)
    {
        // - wendy 프로퍼티 초기화
        this._wendy      = wendy;
        _state_num       = 3;
        _contact         = _wendy.GetContact();
        _start_coroutine = false;

        if (_contact)
        {
            _wendy.SetState(new Wendy_IdleState());
            return;
        }

        // - 초기화
        _wendy.SetWalkAni();

        //이동할 위치
        //_wendy.SetDestination();
        _wendy.StartMovemntCoroutine();
    }