void Start() { player = GameObject.Find("/Player").GetComponent <PlayerCtrl>(); grid = GameObject.Find("/GM").GetComponent <GridSystem>(); beat = GameObject.Find("/GM").GetComponent <BeatCtrl>(); ggm = GameObject.Find("/GlobalGM").GetComponent <GlobalGM>(); this.arm = Instantiate(Resources.Load("Prefabs/" + transform.name[0] + "_arm")) as GameObject; this.arm_ctrl = arm.GetComponent <ArmShaderCtrl>(); //transform.position = new Vector3(5, 5, 5); //this.pos = new Vector3(this.transform.position.x, this.transform.position.y, this.transform.position.z); this.follow = true; //InitPosGrid(); this.can_fall = true; this.project = true; this.beat_after_spawn = 0; this.beat_before_falling = 4; this.init = true; this.to_destroy = false; if (ggm.mode == 2) { this.holding_time = 30; } if (ggm.mode == 3) { this.holding_time = 20; } this.arm_ctrl.arm_mode = 0; }
void Start() { player = GameObject.Find("/Player"); beat = GameObject.Find("/GM").GetComponent <BeatCtrl>(); //last_tetris = GameObject.Find("/Z").GetComponent<Tetris>(); blocks_name.Add("O"); blocks_name.Add("L"); blocks_name.Add("I"); blocks_name.Add("Z"); blocks_name.Add("T"); blocks_name.Add("J"); blocks_name.Add("M"); blocks_name.Add("O"); blocks_name.Add("P"); blocks_name.Add("R"); blocks_name.Add("S"); blocks_name.Add("U"); blocks_name.Add("X"); blocks_name.Add("Y"); zones.Add(new Vector4(2, 2, 5, 5)); zones.Add(new Vector4(2, 6, 5, 9)); zones.Add(new Vector4(2, 10, 5, 13)); zones.Add(new Vector4(5, 2, 9, 5)); zones.Add(new Vector4(10, 2, 13, 5)); zones.Add(new Vector4(10, 6, 13, 9)); zones.Add(new Vector4(6, 10, 9, 13)); zones.Add(new Vector4(9, 9, 13, 13)); init = true; }