private void OnTriggerEnter2D(Collider2D collision) { if (block == null) { //hasnt started yet return; } Game.Player.PlayerController pc = collision.gameObject.GetComponent <PlayerController>(); if (pc != null) { block.trigger(pc); } }
internal abstract void trigger(Game.Player.PlayerController pc);
private void OnTriggerExit2D(Collider2D collision) { Game.Player.PlayerController pc = collision.gameObject.GetComponent <Game.Player.PlayerController>(); block.untrigger(pc); }
/// <summary> /// アイテムを取得したときに得られるアイテム効果 /// (処理を書いてください) /// </summary> protected virtual void GetItemSelf(Game.Player.PlayerController player) { }