// Use this for initialization
    void Start()
    {
        Debug.Log("optionMenuGlobal : Set Time.timeScale = 0");
        Time.timeScale = 0f;

        //全てのコライダーを無効化
        this.diseableAllColliders();

        sVMS = staticValueManagerGetter.getManager();

        _renderShadowToggle.isOn = sVMS.getRenderingShadowFlag();
        Debug.Log(sVMS.getRenderingShadowFlag());
        _renderStageEffToggle.isOn = sVMS.getRenderingStageEffFlag();
        Debug.Log(sVMS.getRenderingStageEffFlag());
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        thisRigiBody2D = this.GetComponent <Rigidbody2D> ();
        sMB            = soundManagerGetter.getManager();
        sVMS           = staticValueManagerGetter.getManager();

        grantExpChara = new HashSet <int>();
        thisEnemyStat = new typeEnemyStatus(_defaultLevel, _defaultEnemyType);

        this.createHPBar();

        //影の作成
        //重いので一時的に停止
        if (_enemyShadow != null && sVMS.getRenderingShadowFlag())
        {
            //影がセットされているときは表示
            GameObject tmpEnemyShadow = new GameObject("enemyShadow");
            tmpEnemyShadow.AddComponent <SpriteRenderer> ();
            tmpEnemyShadow.GetComponent <SpriteRenderer> ().sprite = _enemyShadow;
            tmpEnemyShadow.GetComponent <SpriteRenderer> ().color  = new Color(1f, 1f, 1f, 0.3f);

            tmpEnemyShadow.transform.parent        = this.transform;
            tmpEnemyShadow.transform.localPosition = Vector3.zero;

            textureVector ttv          = new textureVector(this.gameObject);
            Vector3       tmpThisWidth = ttv.getBottomOffset_ForCenterPivot(0f, 0.05f, animeScalingFlag);
            tmpEnemyShadow.transform.localPosition += tmpThisWidth;

            //影画像は128
            float tmpScale = ttv.getWidth(animeScalingFlag) / 1.28f;
            tmpEnemyShadow.transform.localScale = new Vector3(tmpScale, tmpScale, 1f);
        }

        gmS = GameManagerGetter.getGameManager();
    }
    // Use this for initialization
    void Start()
    {
        thisRigiBody = this.GetComponent <Rigidbody2D> ();
        sMB          = soundManagerGetter.getManager();

        gmScript   = GameObject.Find("GameManager").GetComponentInChildren <GameManagerScript>();
        cmrTracker = GameObject.Find("CameraTracker").GetComponentInChildren <cameraTrackerScript> ();

        thisAnimeGO  = this.transform.Find("charaAnime").gameObject;
        thisAnimeter = thisAnimeGO.gameObject.GetComponentInChildren <Animator>();

        thisAudio      = this.gameObject.GetComponentInChildren <AudioSource>();
        thisAtkCircle  = this.transform.Find("atkCircle").gameObject.GetComponentInChildren <SpriteRenderer> ();
        thisAttackErea = this.transform.Find("AttackErea").gameObject;
        //this.gameObject.Find("")

        //ステータスアイコン表示のオブジェクトは起動時に作成
        charaStatusIconCtrlS = Instantiate(_charaStatusIconCtrler).GetComponent <charaStatusIconCtrl>();
        charaStatusIconCtrlS.transform.parent = this.transform;

        this.setMode(characterMode.Attack);

        this.createHPBar();

        staticValueManagerS sVMS = staticValueManagerGetter.getManager();

        //影の作成
        //重いので一時的に停止
        if (_charaShadow != null && sVMS.getRenderingShadowFlag())
        {
            //影がセットされているときは表示
            GameObject tmpEnemyShadow = new GameObject("charaShadow");
            tmpEnemyShadow.AddComponent <SpriteRenderer> ();
            tmpEnemyShadow.GetComponent <SpriteRenderer> ().sprite = _charaShadow;
            tmpEnemyShadow.GetComponent <SpriteRenderer> ().color  = new Color(1f, 1f, 1f, 0.3f);

            tmpEnemyShadow.transform.parent        = this.transform;
            tmpEnemyShadow.transform.localPosition = Vector3.zero;

            textureVector ttv          = new textureVector(this.gameObject);
            Vector3       tmpThisWidth = ttv.getBottomOffset_ForCenterPivot(0f, 0.05f, false);
            tmpEnemyShadow.transform.localPosition += tmpThisWidth;

            //影画像は128
            float tmpScale = ttv.getWidth(false) / 1.28f;
            tmpEnemyShadow.transform.localScale = new Vector3(tmpScale, tmpScale, 1f);
        }

        StartCoroutine(mainLoop());
        StartCoroutine(calcCoolTimeLoop());
    }