using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;

public class KissingEventController : MonoBehaviour
{
    public GameObject Erdem;
    public GameObject Woman;
    public Camera _camera;

    public async void MissionSuccess()
    {

        // remove looping from animation
        Erdem.GetComponent<Animation>().Stop();
        Woman.GetComponent<Animation>().Stop();

        Erdem.transform.DOLocalMove(new(0f, 0f, -1f), 0.5f).SetUpdate(true);
        Woman.transform.DOLocalMove(new(0f, 0f, 1f), 0.5f).SetUpdate(true);

        await EventControls.Instance.KissEventSuccess(_camera);

        Destroy(gameObject, 7f);
    }
}
