示例#1
0
 // Use this for initialization
 void Awake()
 {
     //取得
     _controller      = GetComponent <PlayerController>();
     _anim            = GetComponent <Animator>();
     _rigid           = GetComponent <Rigidbody2D>();
     attack_Collision = GetComponentInChildren <PlayerAttackCollision>();
     kick_Collision   = GetComponentInChildren <PlayerKickCollision>();
 }
 // Use this for initialization
 void Awake()
 {
     //取得
     _controller    = GetComponent <PlayerController>();
     _shoot         = GetComponent <PlayerShoot>();
     player_Effect  = GetComponentInChildren <PlayerEffect>();
     player_SE      = GetComponentInChildren <PlayerSoundEffect>();
     player_Body    = GetComponentInChildren <PlayerBodyCollision>();
     _rigid         = GetComponent <Rigidbody2D>();
     kick_Collision = GetComponentInChildren <PlayerKickCollision>();
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     //取得
     _tilemap = GetComponent <Tilemap>();
     player_Attack_Collision = GameObject.FindWithTag("PlayerTag").GetComponentInChildren <PlayerAttackCollision>();
     player_Kick_Collision   = GameObject.FindWithTag("PlayerTag").GetComponentInChildren <PlayerKickCollision>();
     grass_Tile_Top          = Resources.Load("GrassGroundTop") as TileBase;
     grass_Tile_Bottom       = Resources.Load("GrassGroundBottom") as TileBase;
     //エフェクトのオブジェクトプール
     leaf_Effect_Prefab = Resources.Load("Effect/LeafEffect") as GameObject;
     ObjectPoolManager.Instance.Create_New_Pool(leaf_Effect_Prefab, 4);
 }
 // Use this for initialization
 void Awake()
 {
     //取得
     _controller      = GetComponent <PlayerController>();
     player_SE        = GetComponentInChildren <PlayerSoundEffect>();
     _anim            = GetComponent <Animator>();
     _rigid           = GetComponent <Rigidbody2D>();
     attack_Collision = GetComponentInChildren <PlayerAttackCollision>();
     kick_Collision   = GetComponentInChildren <PlayerKickCollision>();
     player_Manager   = PlayerManager.Instance;
     //オブジェクトプール
     ObjectPoolManager.Instance.Create_New_Pool(mantis_Attack_Bullet, 5);
 }