Beispiel #1
0
    public MovingCar LoadCar(HaulerPlayerScript haulerPlayerScript)
    {
        var pos = haulerPlayerScript.transform.position + PositionOffset;
        var car = Instantiate(Car, pos, Quaternion.identity, haulerPlayerScript.transform);

        Destroy(car.GetComponent <Rigidbody2D>());
        return(car);
    }
Beispiel #2
0
 public void Init(HaulerPlayerScript haulerPlayerScript)
 {
     _haulerPlayerScript = haulerPlayerScript;
 }