Пример #1
0
 void Start()
 {
     resetPlayerZ();
     animatorController = GetComponent <PlayerAnimationController>();
     boxUpdate          = new PlayerBoxUpdate();
     boxUpdate.Init(transform, GetComponent <PlayerColliderBox>(), GetComponent <PlayerBeHurtBox>(), GetComponent <PlayerExploreBox>());
     colliderBox = GetComponent <PlayerColliderBox>();
     //一开始就对玩家的位置进行修正
     target(transform.position, PlayerDirection.Down, PlayerState.Idle);
     boxUpdate.Update(popDirection);
     Debug.Log("New Position " + transform.position.x + "   " + transform.position.y);
 }
Пример #2
0
 void Update()
 {
     boxUpdate.prePosition = transform.position;
     updateMovement();
     boxUpdate.Update(popDirection);
 }