Esempio n. 1
0
    // Use this for initialization
    private void Start()
    {
        //子のインスタンスを入手
        this.emptyAcorns = new GameObject[(int)AcornsNum.ACORNS_MAX];
        for (int i = 0; i < (int)AcornsNum.ACORNS_MAX; i++)
        {
            this.emptyAcorns[i] = transform.Find("EnptyAcorn_" + i).gameObject;
        }

        this.audioClip         = new CustomAudioClip[2];
        this.audioClip[0].Clip = Resources.Load("Audio/SE/Acorn", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;
        this.audioClip[1].Clip = Resources.Load("Audio/SE/tirin1", typeof(AudioClip)) as AudioClip;
        this.audioClip[1].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;

        //デバッグ挙動
        if (this.DebugFlg)
        {
            this.ViewEmptyAcorns(this.DebugMaxAcorn);
            this.View(this.DebugViewAcorn);
        }
    }
Esempio n. 2
0
    private void Start()
    {
        InitStart();
        playerstartPos       = tf.position;
        startscale           = tf.localScale;
        nowscale             = startscale;
        startvelocity        = rb2d.velocity;
        startangularvelocity = rb2d.angularVelocity;

        stageCollider = GameObject.Find("StageBackGround").GetComponent <BoxCollider2D>();
        clipCollider  = GameObject.Find("clip_L").GetComponent <BoxCollider2D>();

        CreateTapEffect();
        tapEffectTransform.GetComponent <Renderer>().enabled = false;

        groundFilter.SetLayerMask(LayerMask.GetMask("Leaf", "Branch", "RedBranch"));    //足場になりうるレイヤー

        hitParticle    = GameObject.Find("EffectManager").GetComponent <EffectManager>().hitEffect;
        pickUpParticle = GameObject.Find("EffectManager").GetComponent <EffectManager>().acornPickUpEffect;

        fd_out = GameObject.Find("Panel").GetComponent <FadeImage>();

        this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[(int)AudioList.AUDIO_JUMP].Clip = Resources.Load("Audio/SE/Filmushi_Jump", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_JUMP].Vol  = 1.0f;
        this.audioClip[(int)AudioList.AUDIO_DEAD].Clip = Resources.Load("Audio/SE/Filmushi_Down", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_DEAD].Vol  = 1.0f;

        this.soueceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.soueceAudio.m_Audio = this.audioClip;
    }
Esempio n. 3
0
    // Use this for initialization
    private void Start()
    {
        nextScene = "StageSelectScene";

        mc = GameObject.Find("MainCamera");
        //tl = GameObject.Find("TitleLogo");
        pnl       = GameObject.Find("FadePanel");
        ts        = GameObject.Find("TouchStart");
        mc_script = mc.GetComponent <TranslationObject>();
        //tl_script = tl.GetComponent<TranslationObject>();
        fd_out = pnl.GetComponent <FadeImage>();

        this.audioClip         = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[0].Clip = Resources.Load("Audio/BGM/BGM_Title", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;
        this.audioClip[1].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioClip[1].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;

        this.sourceAudio.PlayBGM((int)AudioList.AUDIO_BGM, true);

        filmushiMaterial.SetTexture("_MainTex", filmushi_sleep);

        touchStart.SetActive(false);
    }
Esempio n. 4
0
    // Use this for initialization
    private void Start()
    {
        //デバッグモード
        if (!this.debugEnable)
        {
            if (debugTemp)
            {
                //デバッグ用一時データ
                Output = cleardata = this.debugTempdata;
                SaveDataManager.Instance.LoadSaveData();
            }
            else
            {
                Output = cleardata = SaveDataManager.Instance.temp;
            }
            this.Hiscore = SaveDataManager.Instance.GetSaveData(cleardata.stageName);
        }
        else
        {
            cleardata = debugdata;
        }
        this.timeviewInstance  = Instantiate(this.TimeView).GetComponent <ViewTime>();
        this.acornviewInstance = Instantiate(this.AcornView).GetComponent <ViewAcorn>();

        this.audioClip         = new CustomAudioClip[1];
        this.audioClip[0].Clip = Resources.Load("Audio/BGM/BGM_Result", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;

        this.sourceAudio.PlayBGM(0, true);
    }
Esempio n. 5
0
    // Use this for initialization
    private void Start()
    {
        print("start");
        buttonnowtime = 0.0f;
        startfont     = GameObject.Find("StartFont").GetComponent <StartFont>();
        menumanager   = GameObject.Find("MenuManager").GetComponent <MenuManager>();
        menuTransform = GameObject.Find("menuscreen").transform;
        pause         = GameObject.Find("PauseManager").GetComponent <PauseManager>();
        fd_out        = GameObject.Find("Panel").GetComponent <FadeImage>();
        timestop      = GameObject.Find("StageManager").transform.Find("ViewTimeMain").gameObject;
        stageMG       = GameObject.Find("StageManager").GetComponent <StageManager>();
        //値をunityの実変数からもらう
        menuPosition = menuTransform.position;
        //色を変更するゲームオブジェクトを入手
        buttoncolor = GameObject.Find("menu_button_game");
        //今の色コンソールに出力
        Debug.Log(buttoncolor.GetComponent <Renderer>().material.color);

        this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[(int)AudioList.AUDIO_BUTTON].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_BUTTON].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;
    }
Esempio n. 6
0
    // Use this for initialization
    private void Start()
    {
        //子要素入手
        this.m_TimeChild = new GameObject[(int)TimePlaceNum.TIMEPLACE_MAX];
        for (int i = 0; i < (int)TimePlaceNum.TIMEPLACE_MAX; i++)
        {
            this.m_TimeChild[i] = transform.Find(this.m_ChildString[i]).gameObject;
        }

        //表示用配列初期化
        this.m_ViewTimeArray = new int[(int)TimePlaceNum.TIMEPLACE_MAX];
        for (int i = 0; i < (int)TimePlaceNum.TIMEPLACE_MAX; i++)
        {
            this.m_ViewTimeArray[i] = 0;
        }

        this.sourceAudio = this.GetComponent <SourceAudio>();

        //デバッグ用
        if (this.mb_Debug)
        {
            if (this.m_DebugTime < 10000.0f)
            {
                this.View(m_DebugTime);
            }
            else if (this.m_DebugTime >= 10000.0f)
            {
                this.View(999.0f);
            }
        }
    }
Esempio n. 7
0
    // Use this for initialization
    private void Start()
    {
        this.audioClip         = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[0].Clip = Resources.Load("Audio/SE/Button_No", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;
    }
Esempio n. 8
0
    // Use this for initialization
    private void Start()
    {
        SaveDataManager.Instance.LoadSaveData();

        selectStage = SelectStage.NOT_SELECT;

        stageScript[(int)Stages.STAGE_T1] = GameObject.Find("stage_tutorial1_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_T2] = GameObject.Find("stage_tutorial2_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_T3] = GameObject.Find("stage_tutorial3_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_1]  = GameObject.Find("stage_1_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_2]  = GameObject.Find("stage_2_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_3]  = GameObject.Find("stage_3_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_4]  = GameObject.Find("stage_4_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_5]  = GameObject.Find("stage_5_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_6]  = GameObject.Find("stage_6_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_7]  = GameObject.Find("stage_7_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_8]  = GameObject.Find("stage_8_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_9]  = GameObject.Find("stage_9_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_10] = GameObject.Find("stage_10_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_11] = GameObject.Find("stage_11_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_12] = GameObject.Find("stage_12_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_E1] = GameObject.Find("stage_extra1_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_E2] = GameObject.Find("stage_extra2_image").GetComponent <StageImage>();
        stageScript[(int)Stages.STAGE_E3] = GameObject.Find("stage_extra3_image").GetComponent <StageImage>();

        stageSelectPlayer     = GameObject.Find("StageSelectPlayer").GetComponent <StageSelectPlayer>();
        playerDefaultPosition = stageSelectPlayer.gameObject.GetComponent <Transform>().position;
        startButton           = GameObject.Find("StartButton").GetComponent <StartButton>();

        mainCamraTransform          = GameObject.Find("Main Camera").GetComponent <Transform>();
        stageSelectCameraPosition   = GameObject.Find("Page1").GetComponent <Transform>().position;
        stageSelectCameraPosition.z = -10;
        stageDetailCameraPosition   = GameObject.Find("StageDetailBackGround").GetComponent <Transform>().position;
        stageDetailCameraPosition.z = -10;

        this.stageDetail = GameObject.Find("ViewStageDetail").GetComponent <StageDetailManager>();

        nowPage    = 1;
        rightArrow = GameObject.Find("RightArrow").GetComponent <RightArrow>();
        leftArrow  = GameObject.Find("LeftArrow").GetComponent <LeftArrow>();
        tapFlag    = false;
        pageSet    = GameObject.Find("PageSet");
        //MovePage(); //他のシーンから戻った際に初期ページ位置変更

        this.audioClip         = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[0].Clip = Resources.Load("Audio/BGM/BGM_StageSelect", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;

        this.sourceAudio.PlayBGM((int)AudioList.AUDIO_BGM, true);

        CheckUnLock();
    }
Esempio n. 9
0
    private void Start()
    {
        enable = true;

        this.audioClip         = new CustomAudioClip[1];
        this.audioClip[0].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;
    }
Esempio n. 10
0
    // Use this for initialization
    private void Start()
    {
        particle = GameObject.Find("EffectManager").GetComponent <EffectManager>().acornPickUpEffect;

        this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[(int)AudioList.AUDIO_ACORN].Clip = Resources.Load("Audio/SE/Acorn", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_ACORN].Vol  = 0.6f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;
    }
Esempio n. 11
0
    // Use this for initialization
    private void Start()
    {
        fd_out = GameObject.Find("Panel").GetComponent <FadeImage>();

        this.audioClip         = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[0].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = audioClip;
    }
Esempio n. 12
0
    // Use this for initialization
    private void Start()
    {
        bellTexture = transform.GetComponentInChildren <SpriteRenderer>();
        hitFlag     = false;
        timeCount   = 0;

        this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[(int)AudioList.AUDIO_BELL].Clip = Resources.Load("Audio/SE/Bell", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_BELL].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;
    }
Esempio n. 13
0
    private void Start()
    {
        parent = this.transform.root.gameObject;
        fade   = GameObject.Find("Canvas").transform.Find("Panel").GetComponent <FadeImage>();

        this.audioClip         = new CustomAudioClip[2];
        this.audioClip[0].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;
        this.audioClip[1].Clip = Resources.Load("Audio/SE/Button_No", typeof(AudioClip)) as AudioClip;
        this.audioClip[1].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;
    }
Esempio n. 14
0
    // Use this for initialization
    private void Start()
    {
        this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[(int)AudioList.AUDIO_GAME].Clip = Resources.Load("Audio/BGM/BGM_Gamemain", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_GAME].Vol  = 1.0f;

        this.audioClip[(int)AudioList.AUDIO_GOAL].Clip = Resources.Load("Audio/BGM/BGM_Goal", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_GOAL].Vol  = 0.6f;

        sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        sourceAudio.m_Audio = this.audioClip;

        sourceAudio.PlayBGM((int)AudioList.AUDIO_GAME, true);
    }
Esempio n. 15
0
    // Use this for initialization
    private void Start()
    {
        tf            = transform;
        filmSet       = tf.GetChild(0).gameObject; //フィルムセットを取得
        boxCollider2d = GetComponent <BoxCollider2D>();

        Init();

        filmManager = GameObject.Find("FilmManager").GetComponent <FilmManager>();

        this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[(int)AudioList.AUDIO_PIC].Clip = Resources.Load("Audio/SE/Film_Pic", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_PIC].Vol  = 1.0f;
        this.audioClip[(int)AudioList.AUDIO_SET].Clip = Resources.Load("Audio/SE/Film_Set", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_SET].Vol  = 1.0f;

        sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        sourceAudio.m_Audio = this.audioClip;
    }
    // Use this for initialization
    private void Start()
    {
        buttonnowtime  = 0.0f;
        changecolorflg = false;
        mcr            = GameObject.Find("MenuManager").GetComponent <MenuConfirmationRestart>();
        //色を変更するゲームオブジェクトを入手
        rsbuttoncolor  = GameObject.Find("Copy of button_yes_1");
        rsbuttoncolor2 = GameObject.Find("Copy of button_no_1");
        //今の色コンソールに出力
        Debug.Log(rsbuttoncolor.GetComponent <Renderer>().material.color);
        Debug.Log(rsbuttoncolor2.GetComponent <Renderer>().material.color);

        this.audioclip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioclip[(int)AudioList.AUDIO_YES].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioclip[(int)AudioList.AUDIO_YES].Vol  = 1.0f;
        this.audioclip[(int)AudioList.AUDIO_NO].Clip  = Resources.Load("Audio/SE/Button_No", typeof(AudioClip)) as AudioClip;
        this.audioclip[(int)AudioList.AUDIO_NO].Vol   = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioclip;
    }
Esempio n. 17
0
    // Use this for initialization
    private void Start()
    {
        tf                     = transform;
        fixedFlag              = false;
        fallFlag               = false;
        fallSpeed              = 0.0f;
        filmManager            = GameObject.Find("FilmManager").GetComponent <FilmManager>();
        pauseManager           = GameObject.Find("PauseManager").GetComponent <PauseManager>();
        leanSpeed              = filmManager.leanSpeed;
        deepToShallowMoveTime  = filmManager.deepToShallowMovetime;
        deepToShallowMoveSpeed = (filmManager.shallowFilmPosition.y - filmManager.deepFilmPosition.y) / deepToShallowMoveTime;
        clipPosition           = tf.parent.position;

        //フィルムの深さ判定
        if (filmManager.deepFilmPosition.y - 1 <= tf.position.y)
        {
            filmDepthStatus = FilmManager.FilmDepthStatus.DEEP;
        }
        else
        {
            filmDepthStatus = FilmManager.FilmDepthStatus.SHALLOW;
            clipPosition.y -= filmManager.deepFilmPosition.y - tf.position.y;   //浅く挿んだ時は深い位置との差分原点を下げる
        }
        //子である足場を取得
        leaves = GetComponentsInChildren <Leaf>();
        foreach (var leaf in leaves)
        {
            leaf.SetOnPlayerFallTime(filmManager.onPlayerFallTime); //付属する足場にプレイヤーが何秒乗ったら落ちるかをセット
        }

        //Sound
        this.audioClip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[(int)AudioList.AUDIO_DOWN].Clip = Resources.Load("Audio/SE/Film_Down", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_DOWN].Vol  = 1.0f;
        this.audioClip[(int)AudioList.AUDIO_FALL].Clip = Resources.Load("Audio/SE/Film_Fall", typeof(AudioClip)) as AudioClip;
        this.audioClip[(int)AudioList.AUDIO_FALL].Vol  = 1.0f;

        sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        sourceAudio.m_Audio = this.audioClip;
    }
Esempio n. 18
0
    // Use this for initialization
    private void Start()
    {
        buttonnowtime  = 0.0f;
        changecolorflg = false;
        menuManager    = GameObject.Find("MenuManager").GetComponent <MenuManager>();
        //色を変更するゲームオブジェクトを入手
        mumabuttoncolor  = GameObject.Find("text_stage_select");
        mumabuttoncolor2 = GameObject.Find("text_restart");
        mumabuttoncolor3 = GameObject.Find("text_back");
        //今の色コンソールに出力
        Debug.Log(mumabuttoncolor.GetComponent <Renderer>().material.color);
        Debug.Log(mumabuttoncolor2.GetComponent <Renderer>().material.color);
        Debug.Log(mumabuttoncolor3.GetComponent <Renderer>().material.color);

        this.audioclip = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioclip[(int)AudioList.AUDIO_YES].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioclip[(int)AudioList.AUDIO_YES].Vol  = 1.0f;
        this.audioclip[(int)AudioList.AUDIO_NO].Clip  = Resources.Load("Audio/SE/Button_No", typeof(AudioClip)) as AudioClip;
        this.audioclip[(int)AudioList.AUDIO_NO].Vol   = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioclip;
    }
Esempio n. 19
0
    // Use this for initialization
    private void Start()
    {
        stageSelectManager = GameObject.Find("StageSelectManager").GetComponent <StageSelectManager>();
        stageSelectPlayer  = GameObject.Find("StageSelectPlayer").GetComponent <StageSelectPlayer>();
        swayDegreeMax      = stageSelectManager.swayDegreeMax;
        swayDegreeMin      = stageSelectManager.swayDegreeMin;
        swayTime1          = stageSelectManager.swayTime1;
        swayTime2          = stageSelectManager.swayTime2;
        swayTime3          = stageSelectManager.swayTime3;
        swaySpeed          = 0;
        swayStatus         = SWAYSTATUS.NOT_SWAY;

        defaultPosition = tf.position;
        defaultRotation = tf.rotation;
        nowPos          = tf.position;
        clipPosition    = tf.parent.position;

        this.audioClip         = new CustomAudioClip[(int)AudioList.AUDIO_MAX];
        this.audioClip[0].Clip = Resources.Load("Audio/SE/Button_Yes", typeof(AudioClip)) as AudioClip;
        this.audioClip[0].Vol  = 1.0f;

        this.sourceAudio         = this.gameObject.AddComponent <SourceAudio>();
        this.sourceAudio.m_Audio = this.audioClip;
    }