public void OnCollisionEnter2D(Collision2D collision) { int collisionLayer = collision.gameObject.layer; if (groundLayers.Contains(collisionLayer)) { hit = Physics2D.Raycast(transform.position, Vector2.down, 0.5f, groundLayers, -0.5f, 0.5f); if (hit.collider != null) { Debug.DrawRay(transform.position, Vector2.down * 0.5f, Color.red, 5f, false); if (charActiveHolder.Combined) { return; } else if (charActiveHolder.State(otherID) == CharacterState.Braced && !charActiveHolder.Combined) { CombineCharacters(); } else { ToggleBraced(true); } } } else if (obstacleLayers.Contains(collisionLayer)) { } else if (damagingLayers.Contains(collisionLayer)) { Debug.LogWarning("Character " + charID.ToString() + " damaged"); } }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("charID: " + CharID.ToString()); sb.Append(" | characterName: " + CharName); sb.Append(" | picName: " + PicName); return(sb.ToString()); }
public string GetKey() { return("AniDBCommand_GetCharacterInfo" + CharID.ToString()); }
public Sprite GetCharSprite(CharID id) { if (database.ContainsKey(id)) { return(database[id]._sprite); } else { Debug.LogError("Database does not contain a character with the ID: " + id.ToString()); } return(null); }
public BattleChar GetChar(CharID id, int lv) { if (database.ContainsKey(id)) { return(new BattleChar(database[id], lv)); } else { Debug.LogError("Database does not contain a character with the ID: " + id.ToString()); } return(null); }