Beispiel #1
0
        public void LoadStartPlatform()
        {
            var go = GameObject.Find("env_new_zigzag").transform.Find("lc_mngm_001");

            driving_platform_material1 = go.Find("waterfront_001 (1)").GetComponent <Renderer>().material;
            offset1 = driving_platform_material1.GetTextureOffset("_MainTex");

            driving_platform_material2 = go.Find("waterfront_001").GetComponent <Renderer>().material;
            offset2 = driving_platform_material2.GetTextureOffset("_MainTex");

            trees_left  = go.Find("left_set").gameObject;
            trees_right = go.Find("right_set").gameObject;

            PLATFORM_SPEED = 1.5f;

            cur_strategy = item3x3;
            cur_strategy.SetInitOffset(cur_strategy.offset - 1);

            CUBE_RESP_TIME_FACTOR = 1;

            //cur_strategy = item2x2;
            //cur_strategy.SetInitOffset(cur_strategy.offset - 1);

            platform  = ((GameObject)Instantiate(Resources.Load(platform_prefab_path))).transform;
            init_cude = platform.Find("level_particle_init").gameObject;

            Message msg = new Message();

            msg.Type      = Minigames.MiniGameMessageType.INIT_PLATFORM;
            msg.parametrs = new Minigames.UpdateInitPos(platform.transform);
            MessageBus.Instance.SendMessage(msg);
        }
Beispiel #2
0
 public void UpDifficult()
 {
     if (cur_strategy == item3x3)
     {
         cur_strategy = item2x2;
     }
     else if (cur_strategy == item2x2)
     {
         cur_strategy = item1x1;
         cur_strategy.SetInitOffset(cur_strategy.offset + 1);
     }
 }
Beispiel #3
0
 public void SetStrategy(CreationStrategy str)
 {
     cur_strategy = str;
 }