예제 #1
0
    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");
        }
    }
예제 #2
0
        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());
 }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }