コード例 #1
0
ファイル: Item_Throw.cs プロジェクト: BSchaap/ImaginEngine
 void CarryOutThrowActions()
 {
     throwDirection     = myTransform.parent.forward; //forware direction is the direction the player is facing
     myTransform.parent = null;                       //makes sure item doesnt turn if thrown if the player turns
     itemMaster.CallEventObjectThrow();               //Go from kinematic (if held), to not(if thrown) - ex add gravity, force etc.
     HurlItem();
 }
コード例 #2
0
ファイル: Item_Drop.cs プロジェクト: BSchaap/ImaginEngine
 void CheckForDropInput()
 {
     if (Input.GetButtonDown(dropButtonName) && Time.timeScale > 0 && myTransform.root.CompareTag(GameManager_References._playerTag))
     {
         myTransform.parent = null;
         itemMaster.CallEventObjectThrow();
     }
 }