Esempio n. 1
0
 void ThrowInForge()
 {
     if (closeEnough)
     {
         if (craftSystem.useController)
         {
             //往鍛造爐丟材料
             if (Input.GetButtonDown(craftSystem.whichPlayer + "LB"))
             {
                 if (craftSystem.CheckHandle().id == 3)
                 {
                     forge.ThrowFireIn();
                     craftSystem.ThrowOut();
                 }
                 else
                 {
                     //Debug.Log("aaaaaaaaaaaaaaaaaaaaaa" + forge.ThrowElementIn(craftSystem.CheckHandle().id));
                     if (forge.ThrowElementIn(craftSystem.CheckHandle().id))
                     {
                         craftSystem.ThrowOut();
                     }
                 }
             }
             else if (Input.GetButtonDown(craftSystem.whichPlayer + "ButtonA"))
             {
                 forge.OnForging();
             }
         }
         else
         {
             //往鍛造爐丟材料
             if (Input.GetKeyDown(KeyCode.E))
             {
                 if (craftSystem.CheckHandle().id == 3)
                 {
                     forge.ThrowFireIn();
                     craftSystem.ThrowOut();
                 }
                 else
                 {
                     if (forge.ThrowElementIn(craftSystem.CheckHandle().id))
                     {
                         craftSystem.ThrowOut();
                     }
                 }
             }
             else if (Input.GetKeyDown(KeyCode.Space))
             {
                 forge.OnForging();
             }
         }
     }
 }
Esempio n. 2
0
 void CanonState()
 {
     if (!CanoncanFiiled)
     {
         if (CanonTriigerIN && CraftSystemScript.CheckHandle().id == 3)
         {
             outLine.SetOutLine(true);
             CanoncanFiiled = true;
             hint.enabled   = true;
         }
     }
     else
     {
         if (!CanonTriigerIN || CraftSystemScript.CheckHandle().id != 3)
         {
             outLine.SetOutLine(false);
             if (!CanonisfillingPowder)
             {
                 hint.enabled = false;
             }
             CanoncanFiiled = false;
         }
     }
 }