private void Start() { _fade = GetComponent <FadeControl>(); _timer = Time.time; _slideTimer = slideDelay; //Cursor.visible = false; }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); player.gameSceneControl = this; levelControl = new LevelControl(); levelControl.gameSceneControl = this; levelControl.player = player; levelControl.oniGroupPrefab = oniGroupPrefab; levelControl.Create(); resultControl = new ResultControl(); gameUIControl = GameUIControl.Instance; scoreControl = gameUIControl.scoreControl; result.oniDefeatNum = 0; result.evaluationCount = new int[(int)Evaluation.Num]; result.rank = 0; result.score = 0; result.scoreMax = 0; for (int i = 0; i < result.evaluationCount.Length; i++) { result.evaluationCount[i] = 0; } fadeControl = FadeControl.Instance; fadeControl.Fade(3.0f, new Color(0, 0, 0, 1.0f), new Color(0, 0, 0, 0)); nextState = State.Start; }
void Start() { text.SetActive(false); Player = GameObject.FindGameObjectWithTag("Player"); m_Rigidbody = GetComponent <Rigidbody2D>(); rend = GetComponentInChildren <SpriteRenderer>(); fade = FindObjectOfType <FadeControl>(); rend.sortingOrder = 4; }
public Item item;//used for inventory management void Start() { pickupText.gameObject.SetActive(false); textBox = GetComponent <Interactable>();//initialization if (item != null) { item.keyItem = GetComponent <Interactable>(); } fade = FindObjectOfType <FadeControl>(); }
public GameState gameState; // scriptable object // Start is called before the first frame update void Start() { if (instance) { Destroy(this.gameObject); } else { instance = this; } }
void Start() { PlayerControl player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); player.SetPlayable(false); this.fader = FadeControl.get(); this.fader.fade(1.0f, new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.0f)); this.next_state = STATE.TITLE; }
// Use this for initialization void Start() { audio = GetComponent <AudioSource>(); if (!select) { select = (AudioClip)Resources.Load("Sound/select"); } fade = GameObject.Find("Canvas").transform.Find("Image").GetComponent <FadeControl>(); changer = GameObject.Find("SceneChanger").GetComponent <ChangeScene>(); fade.FadeIn(); }
// Use this for initialization void Awake() { if (_instance == null) { _instance = this; } image = GetComponent <Image>(); fadeSpeed = 0.5f; fadeDir = -1; fadeAlpha = 1; }
// -------------------------------------------------------------------------------- // void Start() { // プレイヤーを操作不能にする. PlayerControl player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); player.UnPlayable(); // フェードコントロール. this.fader = FadeControl.get(); this.fader.fade(1.0f, new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.0f)); this.next_step = STEP.TITLE; }
// -------------------------------------------------------------------------------- // void Start() { // 不允许玩家操作 PlayerControl player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); player.UnPlayable(); // 添加淡入淡出控制 this.fader = FadeControl.get(); this.fader.fade(1.0f, new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.0f)); this.next_step = STEP.TITLE; }
// Use this for initialization void Start() { // set player uncontrollable PlayerControl player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); player.IsPlayable = false; fadeControl = FadeControl.Instance; fadeControl.Fade(FadeTime, new Color(0, 0, 0, 1.0f), new Color(0, 0, 0, 0)); startAudio = GetComponent <AudioSource>(); nextState = State.Title; }
private void Awake() { if (Instance == null) { Instance = this; } // ゲーム初回起動時に取得する要素 card = GetComponent <CardControl>(); fade = GetComponent <FadeControl>(); result = GetComponent <ResultControl>(); turnCounter = GetComponent <TurnCounter>(); getCardBox = getCardBoxMainObj.transform.GetChild(0).gameObject; getCardBoxButton = getCardBoxMainObj.transform.GetChild(1).GetComponent <Button>(); title = GetComponent <TitleControl>(); }
// Use this for initialization void Start() { audio = GetComponent <AudioSource>(); if (!enter) { enter = (AudioClip)Resources.Load("Sound/enter"); } fade = GameObject.Find("Canvas").transform.Find("Image").GetComponent <FadeControl>(); name0 = GameObject.Find("Name_0").GetComponentInChildren <CharacterSelecter>(); name1 = GameObject.Find("Name_1").GetComponentInChildren <CharacterSelecter>(); name2 = GameObject.Find("Name_2").GetComponentInChildren <CharacterSelecter>(); textRender = GetComponent <TextRender>(); changer = GetComponent <ChangeScene>(); textRender.Draw("START", 1); fade.FadeIn(); }
public static FadeControl get() { if (FadeControl.instance == null) { GameObject go = GameObject.Find("FadeControl"); if (go != null) { FadeControl.instance = go.GetComponent <FadeControl>(); } else { Debug.LogError("Can't find game object \"FadeControl\"."); } } return(FadeControl.instance); }
// -------------------------------------------------------------------------------- // void Start() { // プレイヤーのインスタンスを探しておく. this.player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); this.player.scene_control = this; // スコアのインスタンスを探しておく. this.score_control = GetComponent <ScoreControl>(); // カメラのインスタンスを探しておく. this.main_camera = GameObject.FindGameObjectWithTag("MainCamera"); this.level_control = new LevelControl(); this.level_control.scene_control = this; this.level_control.player = this.player; this.level_control.OniGroupPrefab = this.OniGroupPrefab; this.level_control.create(); this.result_control = new ResultControl(); // GUI 制御のスクリプト(コンポーネント). this.gui_control = this.GetComponent <GUIControl>(); // フェードコントロールの追加 fader = gameObject.AddComponent <FadeControl>(); // ゲームの結果をクリアーしておく. this.result.oni_defeat_num = 0; this.result.eval_count = new int[(int)EVALUATION.NUM]; this.result.rank = 0; this.result.score = 0; this.result.score_max = 0; for (int i = 0; i < this.result.eval_count.Length; i++) { this.result.eval_count[i] = 0; } // フェードインで開始 this.fader.fade(3.0f, new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.0f)); this.step = STEP.START; }
// -------------------------------------------------------------------------------- // void Start() { // 查找玩家的实例对象 this.player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); this.Display = GameObject.FindGameObjectWithTag("Display"); this.player.scene_control = this; // 查找得分的实例 this.main_camera = GameObject.FindGameObjectWithTag("MainCamera"); this.level_control = new LevelControl(); this.level_control.scene_control = this; this.level_control.player = this.player; this.level_control.OniGroupPrefab = this.OniGroupPrefab; this.level_control.create(); this.result_control = new ResultControl(); // GUI 控制脚本(组件) this.gui_control = GUIControl.get(); // 添加淡入淡出控制. this.score_control = this.gui_control.score_control; // 清空游戏的结果 this.result.oni_defeat_num = 0; this.result.eval_count = new int[(int)EVALUATION.NUM]; this.result.rank = 0; this.result.score = 0; this.result.score_max = 0; for (int i = 0; i < this.result.eval_count.Length; i++) { this.result.eval_count[i] = 0; } // 开始淡入 this.fader = FadeControl.get(); this.fader.fade(3.0f, new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.0f)); this.next_step = STEP.START; }
// ----------------------------------------------------------------------------------- void Start() { // 获取角色相机对象 this.player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>(); this.player.scene_control = this; this.main_camera = GameObject.FindGameObjectWithTag("MainCamera"); // 初始化生成器 this.level_control = new LevelControl(); this.level_control.scene_control = this; this.level_control.player = this.player; this.level_control.OniGroupPrefab = this.OniGroupPrefab; this.level_control.create(); // 初始化结果计算器 this.result_control = new ResultControl(); // UI控制组件 this.gui_control = GUIControl.get(); this.score_control = this.gui_control.score_control; // 清空游戏结果 this.result.oni_defeat_num = 0; this.result.eval_count = new int[(int)EVALUATION.NUM]; this.result.rank = 0; this.result.score = 0; this.result.score_max = 0; for (int i = 0; i < this.result.eval_count.Length; i++) { this.result.eval_count[i] = 0; } this.fader = FadeControl.get(); this.fader.fade(3.0f, new Color(0.0f, 0.0f, 0.0f, 1.0f), new Color(0.0f, 0.0f, 0.0f, 0.0f)); // 开始游戏 this.next_state = STATE.START; }
public FadeCommand(FadeControl fadeControl) => this.fadeControl = fadeControl;
// -------------------------------------------------------------------------------- // void Start() { // プレイヤーのインスタンスを探しておく. this.player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>(); this.player.scene_control = this; // スコアのインスタンスを探しておく. this.score_control = GetComponent<ScoreControl>(); // カメラのインスタンスを探しておく. this.main_camera = GameObject.FindGameObjectWithTag("MainCamera"); this.level_control = new LevelControl(); this.level_control.scene_control = this; this.level_control.player = this.player; this.level_control.OniGroupPrefab = this.OniGroupPrefab; this.level_control.create(); this.result_control = new ResultControl(); // GUI 制御のスクリプト(コンポーネント). this.gui_control = this.GetComponent<GUIControl>(); // フェードコントロールの追加 fader = gameObject.AddComponent<FadeControl>(); // ゲームの結果をクリアーしておく. this.result.oni_defeat_num = 0; this.result.eval_count = new int[(int)EVALUATION.NUM]; this.result.rank = 0; this.result.score = 0; this.result.score_max = 0; for(int i = 0;i < this.result.eval_count.Length;i++) { this.result.eval_count[i] = 0; } // フェードインで開始 this.fader.fade( 3.0f, new Color( 0.0f, 0.0f, 0.0f, 1.0f ), new Color( 0.0f, 0.0f, 0.0f, 0.0f ) ); this.step = STEP.START; }
// -------------------------------------------------------------------------------- // void Start() { // プレイヤーを操作不能にする. PlayerControl player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>(); player.UnPlayable(); // フェードコントロールの追加 this.fader = gameObject.AddComponent<FadeControl>(); //fader = gameObject.AddComponent(); this.fader.fade( 1.0f, new Color( 0.0f, 0.0f, 0.0f, 1.0f ), new Color( 0.0f, 0.0f, 0.0f, 0.0f) ); this.next_step = STEP.TITLE; }
private void Start() { fade = FindObjectOfType <FadeControl>(); }