void Awake()
    {
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();

        switches = GetComponentsInChildren<MechSwitch>();
        blocks = GetComponentsInChildren<MechBlock>();
        spawner = GetComponentInChildren<MonsterSpawning>();

        unlocked = 0;
        puzzleActivated = false;

        blockPositions = new List<List<Vector2>> {
            new List<Vector2> {
                new Vector2(-3f, 17f),
                new Vector2(3f, 17f),
                new Vector2(3f, 11f)
            },
            new List<Vector2> {
                new Vector2(4f, 39f),
                new Vector2(-4f, 39f),
                new Vector2(4f, 31f)
            },
            new List<Vector2> {
                new Vector2(-4f, 53f),
                new Vector2(4f, 53f),
                new Vector2(4f, 63f)
            }
        };
    }
Ejemplo n.º 2
0
 void Awake()
 {
     sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
     bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
     startTime = Time.time;
     j = 0;
 }
Ejemplo n.º 3
0
 void Awake()
 {
     sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
     startTime = Time.time;
     MaxHealthPoint = 2000.0f;
     HealthPoint = 2000.0f;
 }
Ejemplo n.º 4
0
 void Awake()
 {
     sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
     startTime = Time.time;
     lastTime = 0.0f;
     target = GameObject.FindWithTag("Player");
     j = 0;
 }
    void Awake()
    {
        obstaclePrefab = Resources.Load("comp_block");
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
        cman = GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<CutSceneManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();

        currentSetNumber = 0;

        sets = new List<List<Vector2>>();

        List<Vector2> set1 = new List<Vector2>();
        set1.Add(new Vector2(2, 0));
        set1.Add(new Vector2(7, 0));
        set1.Add(new Vector2(6, 1));
        set1.Add(new Vector2(1, 3));
        set1.Add(new Vector2(5, 3));
        set1.Add(new Vector2(2, 5));
        set1.Add(new Vector2(0, 6));
        set1.Add(new Vector2(6, 6));
        set1.Add(new Vector2(3, 7));
        sets.Add(set1);

        List<Vector2> set2 = new List<Vector2>();
        set2.Add(new Vector2(1, 0));
        set2.Add(new Vector2(7, 1));
        set2.Add(new Vector2(9, 2));
        set2.Add(new Vector2(2, 3));
        set2.Add(new Vector2(4, 4));
        set2.Add(new Vector2(6, 4));
        set2.Add(new Vector2(1, 5));
        set2.Add(new Vector2(7, 6));
        set2.Add(new Vector2(0, 7));
        sets.Add(set2);

        List<Vector2> set3 = new List<Vector2>();
        set3.Add(new Vector2(4, 0));
        set3.Add(new Vector2(0, 1));
        set3.Add(new Vector2(9, 4));
        set3.Add(new Vector2(3, 5));
        set3.Add(new Vector2(6, 6));
        set3.Add(new Vector2(1, 7));
        sets.Add(set3);

        List<Vector2> set4 = new List<Vector2>();
        set4.Add(new Vector2(4, 0));
        set4.Add(new Vector2(9, 0));
        set4.Add(new Vector2(8, 2));
        set4.Add(new Vector2(9, 3));
        set4.Add(new Vector2(0, 4));
        set4.Add(new Vector2(2, 5));
        set4.Add(new Vector2(4, 6));
        set4.Add(new Vector2(3, 7));
        set4.Add(new Vector2(8, 7));
        sets.Add(set4);

        StartCoroutine(InitializeObstacles());
    }
Ejemplo n.º 6
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.tag == "Enemy")
     {
         SEManager.Play(SEManager.ClipName.Hit);
         Destroy(collision.gameObject);
         Destroy(gameObject);
     }
 }
Ejemplo n.º 7
0
 private void Awake()
 {
     seManager = FindObjectOfType <SEManager>();
     SetAlphaToOne();
     CreateColors();
     AddFullAlphaColor();
     colorDisplay.SetActive(false);
     showColors.onClick.AddListener(() => colorDisplay.SetActive(!colorDisplay.activeSelf));
 }
Ejemplo n.º 8
0
 private void EndMonsterHouse()
 {
     for (int i = 0; i < WallList.Count; i++)
     {
         WallList[i].SetActive(false);
     }
     SEManager.SetSE(SE);
     gameObject.SetActive(false);
 }
Ejemplo n.º 9
0
 void Start()
 {
     //SEのインスタンス生成
     SEManagerPrefab      = Instantiate(SEManagerPrefab) as SEManager;
     SEManagerPrefab.name = "SEs";
     //初期化
     Question.QuestionManager.Create(ref QuestionFuncs, SEManagerPrefab, QuestionText, AnswerPrefab, AnswerText, CorrectAnswerText, this, "Lesson" + CurrentlyUserInfo.selectedLevel.ToString());
     status = Question.SolveStatus.Waiting;
 }
Ejemplo n.º 10
0
 public void explosionX()
 {
     if (!isBomb)
     {
         SEManager.PlayBombSound();
         explosion[0] = (GameObject)Instantiate(explosionPrefab, transform.position + new Vector3((distancePX - distanceNX) / 2, 0f, 0f), Quaternion.identity);
         explosion[0].transform.localScale = new Vector3(distancePX + distanceNX, 2f, 2f);
     }
 }
Ejemplo n.º 11
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         SEManager.PlaySE(SEManager.getItem);
         TimeManager.Instance.AddTime(this.addTimeValue);
         this.contactPlayerEvent.Invoke();
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 12
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         SEManager.PlaySE(SEManager.stopMovement);
         Rigidbody2D p_rb = collision.transform.parent.GetComponent <Rigidbody2D>();
         p_rb.velocity        = Vector2.zero;
         p_rb.angularVelocity = 0f;
     }
 }
Ejemplo n.º 13
0
 void Start()
 {
     //オブジェクトプール
     ObjectPoolManager.Instance.Create_New_Pool(kick_Crash_Block, block_Num);
     ObjectPoolManager.Instance.Create_New_Pool(shoot_Crash_Block, block_Num);
     ObjectPoolManager.Instance.Create_New_Pool(charge_Kick_Crash_Block, block_Num);
     //取得
     _se          = GetComponentInChildren <SEManager>();
     camera_Shake = GameObject.FindWithTag("MainCamera").GetComponent <CameraShake>();
 }
Ejemplo n.º 14
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (StageManager.Instance.ClearFlagType == E_ClearFlagType.BreakTarget && collision.CompareTag("AttackToEnemy"))
     {
         SEManager.PlaySE(SEManager.getItem);
         this.breakTarget.Invoke();
         ClearFlag_BreakTarget.Instance.BreakTarget();
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 15
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (StageManager.Instance.ClearFlagType == E_ClearFlagType.CollectItem && collision.CompareTag("Player"))
     {
         SEManager.PlaySE(SEManager.getItem);
         this.getMustCollectItem.Invoke();
         ClearFlag_CollectItem.Instance.GetMustCollectItem();
         Destroy(this.gameObject);
     }
 }
Ejemplo n.º 16
0
    // Awake Start Update

    private void Awake()
    {
        this.scriptOptionDirector = this.objectOptionDirector.GetComponent <OptionDirector>();

        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();
    }
Ejemplo n.º 17
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Debug.LogError("More Than two instance");
     }
 }
Ejemplo n.º 18
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return))
     {
         SEManager.PlaySE(SEManager.E_SE.Slash);
     }
     if (Input.GetKeyDown(KeyCode.W))
     {
         SEManager.PlaySE(SEManager.E_SE.Jump);
     }
 }
Ejemplo n.º 19
0
    // Use this for initialization
    void Start()
    {
        saveNextFallPos = nextFallPos;
        Canvas          = GameObject.Find("Canvas");
        GameObject manager = GameObject.FindWithTag("GameController");

        p_seManager  = GameObject.Find("SE").GetComponent <SEManager> ();
        gameManager  = manager.GetComponent <GameManager> ();
        scoreManager = manager.GetComponent <ScoreManager> ();
        Initialize();
    }
Ejemplo n.º 20
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;


            Instance    = this;
            audioSource = GetComponent <AudioSource>();
        }
    }
Ejemplo n.º 21
0
 public void PressBackManual()
 {
     this.manual[this.currentIndex].SetActive(false);
     this.currentIndex--;
     if (this.currentIndex < 0)
     {
         this.currentIndex = this.manualLength - 1;
     }
     this.manual[this.currentIndex].SetActive(true);
     SEManager.PlaySE(SEManager.page);
 }
Ejemplo n.º 22
0
 private void Awake() //스타트보다 먼저 실행되는 함수
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         DontDestroyOnLoad(this.gameObject);
         instance = this;
     }
 }
Ejemplo n.º 23
0
 public bool PutBombermanPrefab()
 {
     if (putBomberManNum < putAbleBomberManNum)
     {
         SEManager.PlayPutBombSound();
         GameObject bomberman = Instantiate(bombermanPrefab, transform.position, Quaternion.identity);
         bomberman.GetComponent <BomberMan>().SetPutter(this.GetComponent <PutObject>());
         putBomberManNum++;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 24
0
 public bool PutLandMinePrefab()
 {
     if (putLandMineNum < putAbleLandMineNum)
     {
         SEManager.PlayPutBombSound();
         GameObject landMine = (GameObject)Instantiate(landMinePrefab, transform.position, Quaternion.identity);
         landMine.GetComponent <LandMine>().SetPutter(this.GetComponent <PutObject>());
         putLandMineNum++;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 25
0
 public bool PutProtectDomePrefab()
 {
     if (putProtectDomeNum < putAbleProtectDomeNum)
     {
         GameObject protectDome = Instantiate(protectDomePrefab, transform.position, Quaternion.identity);
         protectDome.GetComponent <DestroyTimeAgo>().SetPutter(this.GetComponent <PutObject>());
         SEManager.PlayPutObjectSound1();
         putProtectDomeNum++;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 26
0
 // Use this for initialization
 void Start()
 {
     audio       = GetComponent <AudioSource>();
     seManager   = GetComponent <SEManager>();
     changeScale = new ChangeScale(new Vector3(1, 1, 1), changeTime);
     //mirrorRect = new Rect(1, 1, 1, 1);
     normalScale  = transform.localScale;
     scale        = new Vector3(1, 1, 1);//transform.localScale;
     scaleStorage = scale;
     normalMass   = GetComponent <Rigidbody>().mass;
     sizeStorage  = SizeEnum.Normal;
 }
Ejemplo n.º 27
0
    void Awake()
    {
        sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
        bgm = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<BGMManager>();
        startTime = Time.time;
        bossState = 0;
        status = transform.parent.gameObject.GetComponent<Boss>();
        boss = transform.parent;
        StageRefPoint = GameObject.FindGameObjectWithTag("StageRefPoint").transform.position;

        status.isInvicible = true;
    }
Ejemplo n.º 28
0
 public bool PutLaserPrefab()
 {
     if (putLaserNum < putAbleLaserNum)
     {
         SEManager.PlayPutObjectSound0();
         GameObject laser = Instantiate(laserPrefab, shotBullet.transform.position, transform.rotation);
         laser.GetComponent <Laser>().SetPutter(this.GetComponent <PutObject>());
         putLaserNum++;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 29
0
    private void Awake()
    {
        this.objectGameDirector = GameObject.FindWithTag("Director");
        this.scriptOutputTips   = this.objectGameDirector.GetComponent <OutputTips>();

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();

        this.objectParentOfGroups = GameObject.FindWithTag("ParentOfGroups");

        this.scriptBulletManager = this.GetComponent <BulletManager>();
    }
Ejemplo n.º 30
0
 public void PressBackMissionRankingButton()
 {
     SEManager.PlaySE(SEManager.select);
     this.scrollViews[this.showingMissionIndex].SetActive(false);
     this.showingMissionIndex--;
     if (this.showingMissionIndex < 0)
     {
         this.showingMissionIndex = this.missionCount - 1;
     }
     this.scrollViews[this.showingMissionIndex].SetActive(true);
     this.RankingTitleText.text = "ランキング(Mission" + (this.showingMissionIndex + 1).ToString() + ")";
 }
Ejemplo n.º 31
0
 public void OnSelect()
 {
     SEManager.PlaySelectButtonSound();
     lifeNumText.text          = lifeNum;
     moveSpeedText.text        = moveSpeed;
     shotSpeedText.text        = shotSpeed;
     bulletNumText.text        = bulletNum;
     descriptionText.text      = description;
     announceText.text         = announce;
     releaseConditionText.text = releaseCondition;
     selectTankObject.SetActive(true);
 }
Ejemplo n.º 32
0
 public bool PutBatteryPrefab()
 {
     if (putBatteryNum < putAbleBatteryNum)
     {
         GameObject battery = Instantiate(batteryPrefab, new Vector3(shotBullet.transform.position.x, 0f, shotBullet.transform.position.z), transform.rotation);
         battery.GetComponent <DestroyTimeAgo>().SetPutter(this.GetComponent <PutObject>());
         battery.GetComponent <DestroyByAttack>().SetPutter(this.GetComponent <PutObject>());
         SEManager.PlayPutObjectSound0();
         putBatteryNum++;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 33
0
    private void Awake()
    {
        this.objectGameDirector = GameObject.FindWithTag("Director");
        this.scriptDestroyAll   = this.objectGameDirector.GetComponent <DestroyAll>();
        this.scriptOutputTips   = this.objectGameDirector.GetComponent <OutputTips>();

        this.objectMainCamera = GameObject.FindWithTag("MainCamera");

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();

        this.scriptTargetManager = this.GetComponent <TargetManager>();
    }
Ejemplo n.º 34
0
    private void Awake()
    {
        this.scriptGameDirector = this.GetComponent <GameDirector>();
        this.scriptScore        = this.GetComponent <Score>();

        this.objectOptionManager = GameObject.FindWithTag("OptionManager");
        this.scriptGameOption    = this.objectOptionManager.GetComponent <GameOption>();

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();

        this.scriptGameButton = this.objectCanvasButton.GetComponent <GameButton>();
    }
Ejemplo n.º 35
0
 private void Awake()
 {
     if (_instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     if (_instance == null)
     {
         _instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
 }
Ejemplo n.º 36
0
 public void SetPlayerName()
 {
     if (this.inputField.text == "")
     {
         SEManager.PlaySE(SEManager.speedDown);
     }
     else
     {
         SEManager.PlaySE(SEManager.decision);
         StaticData.playerName = this.inputField.text;
         SceneManager.LoadScene("SelectMissionStage");
     }
 }
Ejemplo n.º 37
0
    void Awake()
    {
        if (instance == null) {
            instance = this;
            DontDestroyOnLoad(gameObject);
        } else {
            Destroy(gameObject);
        }
        gameover = GetComponent<GameOverMenu>();
        fader = GetComponent<Fader>();
        gman = GetComponent<GUIManager>();
        pauseScreen = GetComponent<PauseScreen>();
        bgmm = GetComponent<BGMManager>();
        semm = GetComponent<SEManager>();
        GameObject storyController = GameObject.FindGameObjectWithTag(Tags.storyController);
        if (storyController != null) {
            storysemm = storyController.GetComponent<SEManager>();
        }

        paused = false;
    }
Ejemplo n.º 38
0
		public Scenariodate(string text_date,float time ,Route next_route = Route.Main,
		                    CharacterAnimator.Animation jony_animation = CharacterAnimator.Animation.UpScaling,
		                    CharacterAnimator.Animation abery_animation = CharacterAnimator.Animation.UpScaling,
		                    
		                    CharacterAnimator.State jony_state = CharacterAnimator.State.Normal,
							CharacterAnimator.State abery_state = CharacterAnimator.State.Normal,
							int camera_number = -1,
							CameraAnimator.Animation camera_animation = CameraAnimator.Animation.Null,
			ExtraAnimator.Animation extra_animation = ExtraAnimator.Animation.NULL,
			SEManager.SE se_petern = SEManager.SE.NoSound)
		{
			this._text_date = text_date;
			this._next_route = next_route;
			this._time = time;

			this._jony_animation  = jony_animation;
			this._jony_state      = jony_state;
			this._abery_animation = abery_animation;
			this._abery_state     = abery_state;
			this._camera_number   = camera_number;
			this._camera_animation = camera_animation;
			this._extra_animation = extra_animation;
			this._se_pertern = se_petern;
		}
Ejemplo n.º 39
0
	// Use this for initialization
	void Start () {

		Jony = (GameObject.FindGameObjectWithTag ("Jony")).GetComponent<CharacterAnimator>();
		Abery = GameObject.FindGameObjectWithTag ("Abery").GetComponent<CharacterAnimator>();
		_extra_animator = GameObject.FindObjectOfType<ExtraAnimator> ();
		_scenario_text = GameObject.FindObjectOfType<ScenarioText> ();
		_view_camera = GameObject.FindObjectOfType<ChangeCamera> ();
		_camera_animator = GameObject.FindObjectOfType<CameraAnimator> ();
		_cv_reference = GameObject.FindObjectOfType<CVManager> ();
		_se_reference= GameObject.FindObjectOfType<SEManager> ();
		_start_count = GameObject.FindObjectOfType<StartCount> ();
		Style = new GUIStyle();
		State = new GUIStyleState();
        

		//CSVデータから、ルートごとに分けてテキストデータ等を読み込む
		var MasterTable = new CSVMasterTable();
		MasterTable.Load();
		foreach (var Master in MasterTable.All)
		{
			//一度データを取り出す。
			Scenariodate data = new  Scenariodate (
				Master.Scenario, Master.WatchTime, (Route)Master.NextRoute,
				Master.JonyAnimation, Master.AberyAnimation,
				Master.JonyState, Master.AberyState,
				Master.CameraNumber,Master.CameraAnimation,
				Master.ExtraAnimation,Master.SEPetern);

			//ルートにあわせて保存
			switch ((Route)Master.CurrentRoute) {
				 
			case Route.Main:
				
				_Main.Add (data);

				break;
			case Route.A:
				
				_A.Add(data);
				
				break;
			case Route.B:
				
				_B.Add(data);
				
				break;
			case Route.C:
				
				_C.Add(data);
				
				break;
				
			}
			
		}
		
		//	_A.Add(new Scenariodate("ENDTEXT",0,Route.Main));
		//_B.Add(new Scenariodate("ENDTEXT",0,Route.Main));
		//_C.Add(new Scenariodate("ENDTEXT",0,Route.Main));

		_cv_reference.Init();
		_next_route = Route.NULL;
        _do_skip_text = false;
		//UpdateScenerio (Route.Main);

		
	}
Ejemplo n.º 40
0
 protected virtual void Init()
 {
     unitMove = GetComponent<UnitMove>();
     meshRenderer = gameObject.GetComponentInChildren<MeshRenderer>();
     mat_ended = Resources.Load<Material>("Materials/Unit_Turn_Over");
     stats = gameObject.GetComponent<UnitStats>();
     m_statusEffects = gameObject.GetComponent<SEManager>();
     LoadResources();
     SetStats();
     SetPowers();
 }
Ejemplo n.º 41
0
 void Awake()
 {
     sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
 }
Ejemplo n.º 42
0
    void Awake()
    {
        gman = GetComponent<GUIManager>();
        sem = GetComponentInChildren<SEManager>();
        screenHeight = GUIManager.height;
        screenWidth = GUIManager.width;

        waitInterval = 1.0f / characterPerSecond;
    }
Ejemplo n.º 43
0
 protected override void Awake()
 {
     agent = GetComponent<NavMeshAgent>();
     sem = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SEManager>();
 }
Ejemplo n.º 44
0
 void Awake()
 {
     hash = GameObject.FindGameObjectWithTag(Tags.storyController).GetComponent<HashIDs>();
     sem = GameObject.FindGameObjectWithTag(Tags.storyController).GetComponentInChildren<SEManager>();
 }
 void Awake()
 {
     gman = GameObject.FindGameObjectWithTag(Tags.storyController).GetComponent<GUIManager>();
     sem = GameObject.FindGameObjectWithTag(Tags.storyController).GetComponentInChildren<SEManager>();
     fader = GetComponent<Fader>();
 }