コード例 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (m_OwnPlayerCollider2D != collision)
     {
         PlayerSkillSet playerSkillSet = collision.gameObject.GetComponent <PlayerSkillSet>();
         if (playerSkillSet != null)
         {
             playerSkillSet.GetComponent <PhotonView>().RPC("HitAndStun", RpcTarget.All, new object[] { m_OwnPlayerMovement.CharacterDirection, m_HitForce });
         }
     }
 }
コード例 #2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (m_OwnPlayerCollider2D != collision)
     {
         PlayerSkillSet playerSkillSet = collision.gameObject.GetComponent <PlayerSkillSet>();
         if (playerSkillSet != null)
         {
             Vector2 hitDirection = collision.gameObject.transform.position - m_OwnPlayerMovement.gameObject.transform.position;
             float   force        = m_Score * m_BaseHitForce;
             playerSkillSet.GetComponent <PhotonView>().RPC("HitAndStun", RpcTarget.All, new object[] { hitDirection, force });
         }
     }
 }