Ejemplo n.º 1
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.º 2
0
 public bool PutWarpPrefab()
 {
     if (putWarpPairNum < putAbleWarpPairNum)
     {
         if (!putWarp)
         {
             SEManager.PlayPutObjectSound1();
             warp = (GameObject)Instantiate(warpPrefab, transform.position, Quaternion.identity);
             warp.GetComponent <Warp>().SetPutter(this.GetComponent <PutObject>());
             try
             {
                 UseSkill us = this.transform.parent.transform.gameObject.GetComponent <UseSkill>();
                 us.SetSkillCountTime(2.5f);
             }
             catch
             {
             }
         }
         else
         {
             SEManager.PlayPutObjectSound1();
             GameObject exitwarp = (GameObject)Instantiate(exitWarpPrefab, transform.position, Quaternion.identity);
             warp.GetComponent <Warp>().SetPareWarp(exitwarp);
             exitwarp.GetComponent <Warp>().SetPareWarp(warp);
             exitwarp.GetComponent <Warp>().SetPutter(this.GetComponent <PutObject>());
             putWarpPairNum++;
             StartCoroutine(DelayMethod(10f, () =>
             {
                 exitwarp.GetComponent <Warp>().DestroyWarp();
             }));
         }
         putWarp = !putWarp;
         return(true);
     }
     return(false);
 }