コード例 #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     playerInfo = collision.GetComponent <PlayerInfo>();
     if (playerInfo && playerInfo.GetPlayerType() == playerType)
     {
         activated = true;
         playerMovementController = collision.GetComponent <PlayerMovementController>();
         gameRule.CheckControllers();
     }
 }
コード例 #2
0
 void Awake()
 {
     playerMovementController = GetComponent <PlayerMovementController>();
     animator = GetComponent <Animator>();
 }