void Start() { myRig = GetComponent <Rigidbody>(); myMovement = GetComponent <MovementComponetBase>(); weaponCreate = GetComponent <WeaponCreate>(); testPlayerCreate = FindObjectOfType <TestPlayerCreate>(); testPlayerCreate.OnPlayerCreate = (myHandArray) => { myHand = myHandArray; // イベントをバインド myHand[0].grabWeapon += SetDominant; myHand[1].grabWeapon += SetDominant; myHand[0].oppositeWeapon += SetOpposite; myHand[1].oppositeWeapon += SetOpposite; Debug.Log("aaaa"); }; //// イベントをバインド //myHand[0].grabWeapon += SetDominant; //myHand[1].grabWeapon += SetDominant; //myHand[1].oppositeWeapon += SetOpposite; //myHand[1].oppositeWeapon += SetOpposite; }
// Start is called before the first frame update void Start() { myRig = GetComponent <Rigidbody>(); myMovement = GetComponent <MovementComponetBase>(); weaponCreate = GetComponent <WeaponCreate>(); }