Esempio n. 1
0
 void Awake()
 {
     transformAnimator = GetComponent<TransformAnimator>();
     instance = gameObject;
     inventory.onChanged += OnInventoryChanged;
     camera = GetComponent<Camera>();
 }
Esempio n. 2
0
 void Awake()
 {
     instance = gameObject;
     animator = GetComponent<TransformAnimator>();
     animator.getTime = () => TimeManager.RealTime;
     GetComponent<Camera>().layerCullSpherical = true;
 }
    void Start()
    {
        animator = GetComponent<Animator>();
        foreach(SlidingDoorStateBehaviour behaviour in animator.GetBehaviours<SlidingDoorStateBehaviour>()) {
            behaviour.AddListener(this);
        }

        for(int i=0; i<floorPositions.Length; i++) {
            floorPositions[i].y = floorPositions[0].y + i * GameController.floorHeight;
        }

        currentTargetFloor = currentFloor;
        positionDriver = new TransformAnimator();
        targetFloors = 0;
        transform.position = GetFloorPosition(currentFloor);
    }
Esempio n. 4
0
 void Awake() {
     transformAnimator = GetComponent<TransformAnimator>();
 }