예제 #1
0
    void Awake()
    {
        objectPlacePoint = GetComponent <ObjectPlacePoint>();
        objectPlacePoint.onObjectPlaced.AddListener(OnObjectPlaced);

        animator = GetComponent <Animator>();
    }
예제 #2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("ObjectPlacePoint") && objectPlacePointInRadius == null)
     {
         objectPlacePointInRadius = other.GetComponent <ObjectPlacePoint>();
     }
 }
예제 #3
0
    public void OnPlaced(ObjectPlacePoint objectPlacePoint)
    {
        rigidbody.isKinematic = true;
        transform.parent      = objectPlacePoint.holder;

        transform.DOKill();
        transform.DOLocalMove(Vector3.zero, PlayerModel.Instance.playerInteractionController.pickUpMoveDuration).Play();

        objectPlacePoint.OnPlaced(this);
    }
예제 #4
0
 void OnTriggerExit(Collider other)
 {
     if (other.CompareTag("ObjectPlacePoint"))
     {
         var objectPlacePoint = other.GetComponent <ObjectPlacePoint>();
         if (objectPlacePoint == objectPlacePointInRadius)
         {
             objectPlacePointInRadius = null;
         }
     }
 }
 public void AddPointWithMissingObject(ObjectPlacePoint objectPlacePoint)
 {
     pointsWithMissingObjects.Add(objectPlacePoint);
 }