コード例 #1
0
ファイル: PlayerMovement.cs プロジェクト: lswzzz/BombMan
 void Start()
 {
     boxUpdate = new PlayerBoxUpdate();
     boxUpdate.Init(transform, GetComponent <PlayerColliderBox>(), GetComponent <PlayerBeHurtBox>(), GetComponent <PlayerExploreBox>());
     colliderBox       = GetComponent <PlayerColliderBox>();
     behurtBox         = GetComponent <PlayerBeHurtBox>();
     animatoController = GetComponent <PlayerAnimationController>();
     resetPlayerZ();
 }
コード例 #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);
 }