Beispiel #1
0
 void Start()
 {
     boxUpdate = new PlayerBoxUpdate();
     boxUpdate.Init(transform, GetComponent <PlayerColliderBox>(), GetComponent <PlayerBeHurtBox>(), GetComponent <PlayerExploreBox>());
     colliderBox       = GetComponent <PlayerColliderBox>();
     behurtBox         = GetComponent <PlayerBeHurtBox>();
     animatoController = GetComponent <PlayerAnimationController>();
     resetPlayerZ();
 }
Beispiel #2
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);
 }