using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem.EnhancedTouch;

public class CatC : MonoBehaviour
{
    private Rigidbody2D body = null;

    public bool Simulated => this.body.simulated;
    public Vector2 Velocity => this.body.velocity;

    public void Initialize()
    {
        this.body = this.GetComponent<Rigidbody2D>();
        this.body.simulated = false;
    }

    public void BlowAway(Vector2 force)
    {
        this.body.simulated = true;
        this.body.AddForce(force, ForceMode2D.Impulse);
    }

    public void Reset(Transform location)
    {
        this.body.simulated = false;
        this.body.inertia = 0;
        this.body.velocity = Vector2.zero;
        this.body.angularVelocity = 0f;
        this.transform.position = location.position;
    }
}
