void WalkThrough(Collision2D col) { //Physics.IgnoreCollision(gameObject.collider, ) EnemyController eCol = col.gameObject.GetComponent <EnemyController>(); //print("Attempting to walkthrough: collided with: " + eCol.attributes.toString()); if (attributes.name == "dio" && attributes.isEnraged) { DioController dioC = gameObject.GetComponent <DioController>(); dioC.EatFriend(col.gameObject); //Physics2D.IgnoreLayerCollision(attributes.layerNum, eCol.attributes.layerNum, false); return; } else { Physics2D.IgnoreLayerCollision(attributes.layerNum, eCol.attributes.layerNum, true); } }
void Awake() { this.sharedInstance = this; }