| 12345678910111213141516171819202122 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class SoulCollector : MonoBehaviour
- {
- public PlayerController player;
- private void Awake()
- {
- player = GetComponentInParent<PlayerController>();
- }
- private void OnTriggerEnter(Collider other)
- {
- Soul soul = other.GetComponentInParent<Soul>();
- if (soul)
- {
- soul.BeCollect(player.playerId);
- }
- }
- }
|