コード例 #1
0
    public void KillEntity(int cellindex)
    {
        GameObject entityObj = hexGrid.GetEntityObject(cellindex);

        entityStorage.GetPlayerEntityList(entityStats.GetPlayerID(entityObj)).Remove(entityObj);
        Destroy(entityObj);

        hexGrid.SetEntityObject(cellindex, null);
        GameObject attackerHealthText = GameObject.Find("Health " + entityStats.GetUniqueID(entityObj).ToString());

        Destroy(attackerHealthText);

        //add to corpses to hex tile
        hexGrid.AddCorpse(cellindex, entityStats.GetType(entityObj)); //TODO remove once corpse list complete
    }