예제 #1
0
파일: Dummy.cs 프로젝트: HaniL-Kim/Dummy
 //
 private void Scan()
 {
     if (Input.GetKeyDown(KeyCode.Mouse0))
     {
         Transform tf1 = GameManager.instance.GetTileTransformOnMouse();
         if (tf1 != null)
         {
             tileHolding = tf1;
             tileHolding.localPosition = new Vector3(-1, +1, 0);
         }
         else
         {
             tileHolding = null;
         }
     }
     //
     if (Input.GetKeyUp(KeyCode.Mouse0))
     {
         if (tileHolding != null)
         {
             tileHolding.localPosition = Vector3.zero;
         }
         //
         Transform target = GameManager.instance.GetTileTransformOnMouse();
         if (target == null)
         {
             return;
         }
         //
         if (target == tileHolding)
         {
             if (UIManager.instance.UseRSC(scanCost) == false)
             {
                 NoRSC();
                 return;
             }
             //
             usingSkill = true;
             eye.PlayEyeSkillAnim();
             //
             target.GetComponent <Closet>().Flip();
             //
             EffectManager.instance.Play("Scan", target);
         }
         //
         tileHolding = null;
     }
 } // End Scan()