Exemplo n.º 1
0
 void Awake()
 {
     lift.SetTarget(transform);
     rootModel            = GameObject.Find("Models");
     rootModelTransform   = rootModel.transform;
     finishedLiftingEvent = new UnityEvent();
 }
Exemplo n.º 2
0
    void Start()
    {
        rootModelTransform = rootModel.transform;

        lift.SetTarget(transform);
        lift.SetInitialPose(transform.localPosition);
        lift.SetMovingType(Actuator.MovingType.SmoothDamp);
        lift.SetMaxSpeed(speed);
        lift.SetDirection(Vector3.up);
        lift.SetMaxOffset(MAX_HEIGHT);
        lift.SetMinOffset(MIN_HEIGHT);
        // Debug.Log(name + "::" + speed);

        FindFloorRegionInLift();
        UpdateTopModels();
    }